"Coding is just like talking to a unknown girl. Once you talked to her with guts, the next time you'll never afraid",Really? Yes , try it Now !!!
Everything here is for education and learning purpose only , individual holds rights on outer posts/links etc.
Team Cracking The Code
We can use an auxiliary array.. we can copy all the elements of the mxn matrix to that auxiliary linear array and apply quick select algorithm.. complexity would be O(mxn)..
3 comments :
We can use an auxiliary array.. we can copy all the elements of the mxn matrix to that auxiliary linear array and apply quick select algorithm.. complexity would be O(mxn)..
-Convert the input matrix(m*n) in to Yongify matrix [Sorted rows and colums)
- Apply Youngify 'k' times
Time Complexity: O(mnlogn) + O(mnlogm) + O(k*(m+n))
Post a Comment