Find the minimum length unsorted subarray, sorting which makes the complete array sorted. Eg: ( 0 4 12 3 15 16 18 17 19).. Seems like mean length unsorted subarray is from 14 to 17, but its not. Because if you sort that partition you get, ( 0 4 3 12 15 16 17 18 19 ) which is not sorted. Think of all cases and find minimum length such that , if we sort that contiguous subset, we get sorted array.
Answers
Answered by
0
Kth smallest element in a binary a search tree. Given a binary search tree, find k th smallest element in the binary search tree. For example, 5th smallest element in below binary search.
Similar questions
Social Sciences,
6 months ago
English,
6 months ago
Math,
6 months ago
Math,
1 year ago
English,
1 year ago