Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
This is so out of the box, love it!
rupesh sir gazab ka logic hai and your skill of teaching is awesome ,,,keep teaching
Thanks dude..
Outstanding elucidation sir
Best explanation on this thus far
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.
nice and simple, 👍 thank you
Thanks a lot for such an informative video. Please keep uplaodng more video on leetcode.
Sure I will
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
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).
@@kshitijgupta592o(n) is not possible
can we do no of swaps = no. of misplaced pairs/2 ??
yes u can
@@faiazmahmud6277 try that with [4,3,1,2]
amazing
logic ki ___
This is so out of the box, love it!
rupesh sir gazab ka logic hai and your skill of teaching is awesome ,,,keep teaching
Thanks dude..
Outstanding elucidation sir
Best explanation on this thus far
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.
nice and simple, 👍 thank you
Thanks..
Thanks a lot for such an informative video. Please keep uplaodng more video on leetcode.
Sure I will
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
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).
@@kshitijgupta592o(n) is not possible
can we do no of swaps = no. of misplaced pairs/2 ??
yes u can
@@faiazmahmud6277 try that with [4,3,1,2]
amazing
logic ki ___