We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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.
Minimum Absolute Difference in an Array
You are viewing a single comment's thread. Return to all 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.