Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
rupesh sir gazab ka logic hai and your skill of teaching is awesome ,,,keep teaching
Thanks dude..
Best explanation on this thus far
What will be the Time Complexity of this code especially that swapping part... I think it may go upto (n^2)
O(n)
O(2n) in worst case@@kshitijgupta592
@@kshitijgupta592 Sorting is O(n*Log(n)), So this code is Time complexity is O(n)+n*Log(n) +O(n).
Thanks a lot for such an informative video. Please keep uplaodng more video on leetcode.
Sure I will
What kind of solution this is. !!!! To get minimum swap in sort : you sorted the array first and then found out the location and comparing.This is a hack , not a solution.
Actually your function should return the correct output no matter what you do inside that function :D
@@CppNuts hahahaahhahahaah anyways I read your rest of the contents and they are good.
Thanks..
Rupesh could have used std::map instead of vector, then he didn't need to swap.
can we do no of swaps = no. of misplaced pairs/2 ??
yes u can
@@faiazmahmud6277 try that with [4,3,1,2]
Nice explanation
I saw you after long time, it makes me feel that i am still relevant.. :D
@@CppNuts I added your videos in watch later list due to ofc work🙁🙁....I ll watch all of them ...No doubt ..your videos always nice and wonderful.
@@ankitahlawat4812 Felt good.. thanks..
@@CppNuts yes your videos are good, do videod for greedy, dynamic programming,divide and conquer also
amazing
nice and simple, 👍 thank you
rupesh sir gazab ka logic hai and your skill of teaching is awesome ,,,keep teaching
Thanks dude..
Best explanation on this thus far
What will be the Time Complexity of this code especially that swapping part... I think it may go upto (n^2)
O(n)
O(2n) in worst case@@kshitijgupta592
@@kshitijgupta592 Sorting is O(n*Log(n)), So this code is Time complexity is O(n)+n*Log(n) +O(n).
Thanks a lot for such an informative video. Please keep uplaodng more video on leetcode.
Sure I will
What kind of solution this is. !!!!
To get minimum swap in sort : you sorted the array first and then found out the location and comparing.
This is a hack , not a solution.
Actually your function should return the correct output no matter what you do inside that function :D
@@CppNuts hahahaahhahahaah anyways I read your rest of the contents and they are good.
Thanks..
Rupesh could have used std::map instead of vector, then he didn't need to swap.
can we do no of swaps = no. of misplaced pairs/2 ??
yes u can
@@faiazmahmud6277 try that with [4,3,1,2]
Nice explanation
I saw you after long time, it makes me feel that i am still relevant.. :D
@@CppNuts I added your videos in watch later list due to ofc work🙁🙁....I ll watch all of them ...
No doubt ..your videos always nice and wonderful.
@@ankitahlawat4812 Felt good.. thanks..
@@CppNuts yes your videos are good, do videod for greedy, dynamic programming,divide and conquer also
amazing
nice and simple, 👍 thank you
Thanks..