There is no need to use set. If you have already sorted the nums array simply add condition in for loop i.e if(i>idx && nums[i]==nums[i-1]) continue; duplicates will be already removed
Hey @nikoo28, I am a regular viewer of your videos and honestly they are very helpful in understanding the concepts clearly. I have just a small suggestion for this explanation. Although, this approach works, but it is not optimal. Also, for someone like me who uses javascript, the includes method in js (equivalent to contains in java) will return false. Another approach can be to check inside the loop if(i > start && nums[i - 1] === nums[i]) continue; Not running the loop when this condition is there and this shall also give the same result. Nonetheless, please keep making these videos. You have no idea how much it makes our lives easier. Thank you for all the effort you put in. Cheers!
Brother, give me an order. Which playlist of your channel should I watch first and then what? Can you make some math videos? I am not very good at math but not that weak as well. Will you make it easy by teaching what exactly we need?
The best way to start would be starting the Algorithmic Paradigms list Then move on to Data Structures. Start solving and look problems on LeetCode easy problems
@@nikoo28it was way better than others it helped me a lot .....just a question is it a full solution for back track approach and language u used it is Java??
U ARE THE BEST EXPLAINER OF THE LEETCODE. Just keep it up bro🔥
trying my best
After watching Subsets and permutations, I was able to solve it on my own! Thanks
Excellent!
There is no need to use set.
If you have already sorted the nums array simply add condition in for loop i.e
if(i>idx && nums[i]==nums[i-1])
continue;
duplicates will be already removed
Where is he using the set?
@@pratikdey4239 to check for the duplicates
Hey @nikoo28, I am a regular viewer of your videos and honestly they are very helpful in understanding the concepts clearly. I have just a small suggestion for this explanation. Although, this approach works, but it is not optimal. Also, for someone like me who uses javascript, the includes method in js (equivalent to contains in java) will return false. Another approach can be to check inside the loop
if(i > start && nums[i - 1] === nums[i]) continue;
Not running the loop when this condition is there and this shall also give the same result.
Nonetheless, please keep making these videos. You have no idea how much it makes our lives easier. Thank you for all the effort you put in. Cheers!
my respect towards your explanation sir
thanks alot bhaiya I always look for ur videos even when I solve the problem my self as everytime I learn something from ur videos.
If you are putting result lists in set and checking if it contains the list than why you have sorted first no need to sort!!!
we want to remove all duplicates, hence sorting helps
Brother, give me an order. Which playlist of your channel should I watch first and then what? Can you make some math videos? I am not very good at math but not that weak as well. Will you make it easy by teaching what exactly we need?
The best way to start would be starting the Algorithmic Paradigms list
Then move on to Data Structures.
Start solving and look problems on LeetCode easy problems
That will give you some direction on getting started.
Reach out to me if you have more doubts.
Thank you
very bad explaination
which part did you struggle with?
@@nikoo28it was way better than others it helped me a lot
.....just a question is it a full solution for back track approach and language u used it is Java??