Given an array $A = \{a_1, a_2, \dots, a_n\}$ of unsorted distinct integers, write a program in pseudo-code for the following problem: given an integer $u$, arrange the elements of the array $A$ such that all the elements in A which are less than or equal to $u$ are at the beginning of the array, and the elements which are greater than $u$ are at the end of the array. You may use at most 5 extra variables apart from the array $A$.