Minimum Absolute Difference in an Array

  • + 3 comments

    Can't stop thinking the same. Well, actually we can sort the array in linear time using count sort (linear in terms of the range of elements in the array) and have a linear running time algorithm but it's not really elegant since we increase space complexity.