In today's session, we'd chill and vibe as usual over a couple of questions. Some of the questions will be in this Gist and we might choose some randomly from LeetCode. The questions are listed below, answers will be posted here subsequently.
Write a program that takes an array A and an index i rnto A, and rearranges the elements such
that all elements less than A[r] (the "pivot") appear first, followed by elements equal to the pivot,
followed by elements greater than the pivot. You are expected to have a function solution(array, index)
Example: