Subsets | LeetCode 78 | C++, Java, Python | Power Set

preview_player
Показать описание
Github Link:

**** Best Books For Data Structures & Algorithms for Interviews:**********
*****************************************************************************

00:05 - Recursive Solution
17:18 - Iterative solution

July LeetCoding Challenge | Problem 11 | Subsets | 11 July,
Facebook Coding Interview question,
google coding interview question,
leetcode,
Subsets,
Subsets c++,
Subsets Java,
Subsets python,
Subsets solution,
78. Subsets,

#CodingInterview #LeetCode #JulyLeetCodingChallenge #Google #Amazon #Subsets #powerset

00:05 - Recursive Solution
17:18 - Iterative solution
Рекомендации по теме
Комментарии
Автор

I like how you first explain the theory and THEN write the code. A lot of youtubers just explain their pre-written code which is not helpful at all.
And the best part about your video is that you gave all variations for the solution! Wow. Crazy good content right here.

theawless
Автор

Watched a few videos and read a few articles on this. This is by FAR the best explanation I've seen and I FINALLY understand it! Thank you!

Talhaguy
Автор

Thank you good sir! This was probably the best explanation for this problem! You are a god send!

janmichaelaustria
Автор

Back to back videos ... great job sir...I am completely dependent on you.... can you please upload some videos on linked list

raviashwin
Автор

Amazing video, such a clear and easy explanation. It's apparent from your content that not only do you know what you are talking about but also how to teach!! I have watched a couple other videos for this same problem and no one was able to simplify as you did.

afzalchishti
Автор

I wanted the code in C++ but the presentation he nailed it 🔥🔥

notyet
Автор

Thanks for explaining the algorithmic representation before the code. That helped to simplify the recursive solution

arunprasad
Автор

Such an amazing explanation!! I was completely able to visualize the recursion!! Thanks!!

Rajat-Sharma
Автор

Can someone explain to me his calculation at 18:35 please?
I thought the sum would just be: 2^0 + 2^1 + 2^2 .... + 2^(n - 1) => O(2^n)

Why does he have: 1 * 2^0 + 2 * 2^1 + 3 * 2^2 + .... => O(n * 2^n), which is much slower than O(2^n)
This really drives me crazy.

kevinle
Автор

Thanks for that. I was considering the bitmask solution, but was concerned that no limit was shown for the size of nums.

crankyinmv
Автор

In the first iteration n=result.size() will give a value of 0 right? How does it enter the loop then? Also, assigning result[i] to r is really cool. I did not know we can assign a value directly to a vector without indexing. Is my understanding correct?

VenkatIyer
Автор

sir i love the way you explain.sir can you please make video on kth largest sum of contigous subarray

saurabhgupta
Автор

Thank you so much Sir, this explanation was the best!!

Автор

If possible please add timestamps 🙄, for recursive, and iteration etc.

srikanthracharla
Автор

thanks so much this is the only solution that i understood

lisajiang
Автор

How would do for subsets ii problem(if it contains duplicates?) in iterative way?

chandup
Автор

Wow! amazing explanation...
Thank you so much! :)

Mr_SSK
Автор

And how about the power set in lexicographical order?

yashkute
Автор

can you share phyton code please for recursive solution?

fardeendingankar
Автор

thank u sir ...great explaination
i am new to python, pls tell me at 26:41 how u concatenated lists

abdullahzaidan
join shbcf.ru