height checker better option
Leetcode question of height checker given an array of integers, not in ascending order, find mismatch nodes count https://leetcode.com/problems/height-checker/description/ Typical solution is regular array sort and compare - O(n logn) Counting sort or use approach of buckets then scan again - O(n) counting sort approach - https://leetcode.com/problems/height-checker/solutions/299910/java-o-n-no-sort/ bucket based solution - https://leetcode.com/problems/height-checker/solutions/299910/java-o-n-no-sort/