Subsets | LeetCode 78 | C++, Java, Python | Power Set
Vložit
- čas přidán 29. 07. 2024
- Data Structures & Algorithms course: www.udemy.com/course/data-str...
LeetCode Solutions: • LeetCode Solutions | L...
June LeetCoding Challenge: • Playlist
May LeetCoding Challenge: • Playlist
Github Link:
*** Best Books For Data Structures & Algorithms for Interviews:*********
1. Cracking the Coding Interview: amzn.to/2WeO3eO
2. Cracking the Coding Interview Paperback: amzn.to/3aSSe3Q
3. Coding Interview Questions - Narasimha Karumanchi: amzn.to/3cYqjkV
4. Data Structures and Algorithms Made Easy - N. Karumanchi: amzn.to/2U8FrDt
5. Data Structures & Algorithms made Easy in Java - N. Karumanchi: amzn.to/2U0qZgY
6. Introduction to Algorithms - CLR - Cormen, Leiserson, Rivest: amzn.to/2Wdp8rZ
*****************************************************************************
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.
Thanks. Glad it was helpful!
I guess im asking randomly but does anyone know of a tool to log back into an instagram account??
I was stupid forgot the account password. I love any tricks you can offer me
@Denver Elisha Instablaster =)
@Nash August I really appreciate your reply. I got to the site on google and I'm waiting for the hacking stuff atm.
Seems to take a while so I will get back to you later with my results.
@Nash August it worked and I finally got access to my account again. I'm so happy!
Thank you so much, you saved my account :D
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!
Great to hear!
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.
Same bro. Got any solution?
Thank you good sir! This was probably the best explanation for this problem! You are a god send!
Thanks.
@@KnowledgeCenter 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.
How would do for subsets ii problem(if it contains duplicates?) in iterative way?
Back to back videos ... great job sir...I am completely dependent on you.... can you please upload some videos on linked list
Such an amazing explanation!! I was completely able to visualize the recursion!! Thanks!!
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?
And how about the power set in lexicographical order?
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.
Thanks a lot.
I wanted the code in C++ but the presentation he nailed it 🔥🔥
Thanks for that. I was considering the bitmask solution, but was concerned that no limit was shown for the size of nums.
Thanks for explaining the algorithmic representation before the code. That helped to simplify the recursive solution
great
This explanation is so clear.
Thanks.
Thank you so much Sir, this explanation was the best!!
can you share phyton code please for recursive solution?
great.........
Thanks
sir i love the way you explain.sir can you please make video on kth largest sum of contigous subarray
Wow! amazing explanation...
Thank you so much! :)
thanks, amazing video
Nice explanation!
thanks so much this is the only solution that i understood
Glad to hear.
Thanks for the video.
Welcome
Thank you sir thanks a lot ☺☺🙂
Welcome
If possible please add timestamps 🙄, for recursive, and iteration etc.
00:05 - Recursive Solution
17:18 - Iterative solution
@@KnowledgeCenter thank you 😍😍
thank u sir ...great explaination
i am new to python , pls tell me at 26:41 how u concatenated lists
In Python you can concatenate 2 lists with + .
e.g., list1 = ["x", 5, "z"]
list2 = [1, 2, 3]
list3 = list1 + list2 # list3 is ['x', 5, 'z', 1, 2, 3]
AB De villiers. You stopped playing Cricket, and started doing Coding?
@@KnowledgeCenter 😂😂 bht scope h coding me Sir
Superb solution sir❤️
Thank you.
Good job
Thank you, Sir :)
Welcome.
anyone getting memory limit exceeded error?
Yes