Рет қаралды 26,262
This video explains a very important programming interview problem which is to reconstruct a given queue based on height and rank parameters.This is a very good hybrid sorting and searching problem.We need to sort the array using a comparator function which sorts based on both height and rank.After sorting, we need to place all the persons starting from least height to their correct position and queue which results in the proper answer queue reconstructed from the given input queue.I have explained the intuition and approach using examples and at the end of the video,i have also shown the code walkthrough. CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
=================================================================
INSTAGRAM: / surya.pratap.k
LinkedIn: / surya-pratap-kahar-47b...
=================================================================
CODE LINK: gist.github.co...
OTHER PROBLEM:-
Implement Queue using Stack (with Example): • Implement Queue using ...
Candy distribution problem: • Candy distribution pro...