The goal of this problem is to explain the difference between an "in-place" solution versus a solution with n space. You are given an array and an index, where the pivot is defined as arr[index]. Your goal is to sort it such that elements less than comes first, then elements equal to, lastly elements greater than.