Dream11 interview question

Painters partition problem, word search problem and given a unsorted array, find the max difference between adjacent elements when the array is in sorted order( without actually sorting the array ie in O(n) time