This is a very old video, for better sound and camera quality DSA videos, learn from the below playlist! Java Plus DSA ( Java + DSA + Problem Solving ) th-cam.com/play/PLQ7ZAf76c0ZPVdhV1bAjFv0bQc1xHURzE.html
what if i want to find the first largest the second largest the third largest and so on... except for sorting and accessing the value via index what would be the best solution to find 1st 2nd 3rd 4th ...nth largesrt element? this solution wouldn't work you wouldn't mantain n variables to get n largest or the if else conditions to swap values right?
This is a very old video, for better sound and camera quality DSA videos, learn from the below playlist!
Java Plus DSA ( Java + DSA + Problem Solving )
th-cam.com/play/PLQ7ZAf76c0ZPVdhV1bAjFv0bQc1xHURzE.html
I was finding 3rd max no. through sorting the array but now it's easy way to find it by this method .
Thank You 👍🏻
i also search in this solution explanation ...thanks
Thanks. Dosto ke sath bhi share kro😃
Very good bhai
Thanku so much sir ✨
Need solution for O(k) where k is the kth largest number.
{1,1,1,1,1,0} here which one is the 3rd largest ???
Thanks
Sir video continuosly zoom out zoom in so it is so irritating please update video sir 🙏🙏🙏
Follow this playlist only for better quality videos.
th-cam.com/play/PLQ7ZAf76c0ZPVdhV1bAjFv0bQc1xHURzE.html&si=lKkrxBe6eMfGqnlm
Without ladder technique program will solve in O(n) time using variable maxx ,current, previous maxx
With the if else ladder logic, the time complexity is still O(n) and concepts are almost similar.
@@shashwat_tiwari_st please send na solutions
@@rajnikantrouth780 I have already attached the link of the code in the description of this video.
Check it.
what if i want to find the first largest the second largest the third largest and so on... except for sorting and accessing the value via index what would be the best solution to find 1st 2nd 3rd 4th ...nth largesrt element? this solution wouldn't work you wouldn't mantain n variables to get n largest or the if else conditions to swap values right?
This solution is not feasible for all elements.
One is sort
Second option is Convert into BST and perform inorder