Here was another interesting interview question on arrays How do you sort the array so that all the odd elements are before all the even elements. And both these subarrays must be sorted. We can first split the array so that all odd elements are in first subarray and all even elements come afterwards. Next we can use some sorting method to sort these two sub-arrays separately. Next comes the question. How do we split the array? For ith element in array, if it is even remove the element from ith position move it to end of array Repeat this process for all elements from last to 0th Here is the code to split array into odd and even. int splitOddEven ( int * arr, int n) { int i; int evencount =0 ; for (i = n -1 ;i >=0 ;i -- ) { if (arr[i] %2==0 ) { move_extreme_right(arr,n,i); evencount ++ ; } } return evencount; } The function test whether arr[i] is even. If yes, to moves the element ...