Print all subsets of array 🔥 | Leetcode 78 | Recursion | Medium

preview_player
Показать описание
Please like, share and subscribe if you found the video useful. Feel free to ask in comments section if you have any doubts. :)

#Leetcode
#Recursion
#Subsets
print subsets of an array
#interview preparation
LIKE | SHARE | SUBSCRIBE
Рекомендации по теме
Комментарии
Автор

Relax guys.. nothing wrong with your headphones.

gaganbedi
Автор

Why we didn't wrote vector <int>& temp.
How are we making changes in temp if we are not passing it by reference?
Please someone explain

tejasu
Автор

Return subset of an array :- please solve this one i found this question in coding ninja
Given an integer array (of length n), find and return all the subsets of input array.

vivekdhiman
Автор

the explanation is fine, but in code where are you popping out the item from temp, when not considering, please correct me if I am wrong. please reply even if it is correct

lavakumarkoyi
Автор

You saved my day! Intuitive & concise.

pran
Автор

Poorly explained but i understood. Thanks. ❤

gaganbedi
Автор

Great explanation. Please make a video for return subsets of an array.

akshaysharma
Автор

Not Working for javascript, After we push then in recursive function value of i is greater than the ArrLength.

mousikeanurag
Автор

Dii i think when we returing from 2nd condition we must have to exclude the last value of temp.
.
.
temp.push_back(nums[i]);

temp.remove(temp.size()-1);

Let me know weather i am right or not?

introvertom
Автор

please make video on return subset of array

RaviShankarMahto-cznl
Автор

best explanation i have ever seen .. Thank U so much

aaravkumar
Автор

how about duplicates? i don't think it handled duplicity.fpr ex: [1, 2, 2, 4], { [1, 2], [1, 2] }two same subset will be generated. please do correct me if I am wrong

gaurav_das
Автор

Please make video on problem return subset sum to k using recursion

financewitharyan
Автор

Can u pls tell Ques - RETURN SUBSETS OF ARRAY .. ??

aaravkumar
Автор

there is some audio prblm in your videos, see if u can fix it

amantarar
Автор

can't we write the code of print subsets of array in return subsets of arrays as they provide same output

shardul
Автор

Keep posting... Good going... Well explained...well done

gauravgrover
Автор

if(start == nums.length){
ArrayList a = new ArrayList(resultList);
list.add(a);
return;
}
subsetsHelper(list, resultList, nums, start+1);
resultList.add(nums[start]);
subsetsHelper(list, resultList, nums, start+1);


}

Your solution is wrong in terms of JAVA

saravanamoorthy
visit shbcf.ru