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 :)
I've seen your videos many times and you're way of explanation is great...!!! thank you
I always learn something new from you, thanks alot! btw I used the approach I learned from you "Counting Sort".
your explanation is too good every one can understand . thanks bro
That's pretty clever.
Really interesting solution.👍
you are underated
thaaanks
Wow, Amazing Explanation 🥰🙏Thank You❤
Thank you so much
great explanation👍👍
thank for the video) 💘
you have made this approach ??
by the way ,i liked this approach
Thanks
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
Fire 🔥 bro
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
Good bhaiya
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 :)