Leetcode_bubbleSort_Height Checker
Problem Complexity Time complexity: O(n^2) Code /** Height Checker - students stand in single file line in non-decreasing order - expected[i] -> i'th student - heights : current order array - return numbers of indices where heights[i] not equal to expected[i] */ const heights = [1,1,4,2,1,3] const expected = [1,1,1,2,3,4] var heightChecker = function(heights) { const expected = [...heights] // G..
2023. 4. 19.