I couldn’t understand the brute force method and efficient method time complexity difference... In brute force meth, iterating through every elements doesn’t take O(n) too? :)
In Brute Force method you are iterating over the array again and again to find the element. So you are doing n iterations for n items. Hence, a time complexity of O(n^2) In the efficient method, you only iterate once Hope that helps :)
your explanation is too good every one can understand . thanks bro
so much thank you my dear bro the way you you teach us is very easy way to learn this coding thank you
I've seen your videos many times and you're way of explanation is great...!!! thank you
you are underated
That's pretty clever.
Really interesting solution.👍
I always learn something new from you, thanks alot! btw I used the approach I learned from you "Counting Sort".
Wow, Amazing Explanation 🥰🙏Thank You❤
Thank you so much
thanks man
great explanation👍👍
thank for the video) 💘
Thanks
thaaanks
Good bhaiya
Fire 🔥 bro
you have made this approach ??
by the way ,i liked this approach
Tried this using the count sort. I have created a temp array and stored the frequencies.Is my approach can be considered as optimal?
Yep…this solution will also be optimal
I couldn’t understand the brute force method and efficient method time complexity difference... In brute force meth, iterating through every elements doesn’t take O(n) too? :)
In Brute Force method you are iterating over the array again and again to find the element. So you are doing n iterations for n items.
Hence, a time complexity of O(n^2)
In the efficient method, you only iterate once
Hope that helps :)
@@nikoo2805 thank u...can u share the brute force code please?
No need to create new array while multiplying with -1?
I think you do if some elements in the array are negative. In these examples they are all positive and yes you can update the existing array
Making Video is So long for no reason
Thuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
Everyone has a different learning pace my friend. For quick learners there are always timestamps and chapters you can skip to :)