LeetCode Tutorial 78. Subsets

preview_player
Показать описание
GoodTecher LeetCode Tutorial 78. Subsets (Java)

LeetCode Tutorial by GoodTecher. The tutorial provides a step-by-step demonstration on how to solve coding problems.

Complete Playlist for the GoodTecher LeetCode Tutorial:

GoodTecher Website:

GoodTecher Channel on YouTube:

GoodTecher Github:
Рекомендации по теме
Комментарии
Автор

This was literally perfect. Not sure why this video has down votes. 🤦🏽‍♂️ went over the algorithm in great detail, talked about time complexity and wrote extremely clean and easy to understand code. I guess you Can’t please everyone.

marcushines
Автор

And where is [1, 3] as a subset in your tree?

yinglinchen
Автор

I watched so many videos to understand this problem and this one is the best! Thank you!

Postprqbu
Автор

Thanks Backtracking visualization is clearer than before.

cpsarathe
Автор

The neglected subset[1, 3] makes me feel that the first time it go back, it go to rather than the neighbor layer but the root layer, which troubles me for half an hour. Changing that may be better:). Anyway, the vedio is good. Thanks for sharing.

ziyiliu
Автор

The time complexity should be 2^n, since there is 2^n nodes in the tree, and for each node the visiting time is O(1) which is just add the List<Integer> subset to List<List<Integer>> res.

yinglinchen
Автор

It looks like magic when you knew
a) to add subset as new arrayList // results.add(new ArrayList<>(subset));
b) to remove the list in the for loop.

How did you come up with that?
Did God gave that to you?

LetsBeHuman
Автор

This video is misleading. If you print out the order that you add to the final result, you will see that it adds [1, 3] before [2]

JohnDoe-wpkb
Автор

Very good teaching! Keep up the good work!!

annas
Автор

I didn’t understand the recursion here.
And when will subset.remove functions.
Can you please explain

govardhanmani
Автор

thanks a lot bro for your explanations

ankurgupta
Автор

May I know what is the need for Sorting ?

suhasnayak
Автор

Is sorting the array really necessary?

nazmussadat
Автор

I finally get it, thank you so much for the illustrations!

MrACrazyHobo
Автор

There are 8 possible sets but in your example I see only 7, is it correct implementation?

Utopian
Автор

i don't think you really understand your code I think you just copy other person’s code and put your own understanding in the video. You are missing one important part, which is after recursive what happened for each case.

biaojin
Автор

sounds like you memorized the solution from somewhere and just regurgitated it back here in the video

arbindrabajracharya
Автор

Probably, over confidence makes people create videos of a wrong solution. Yet they earn money ....

enlightenmentdream
visit shbcf.ru