Leetcode - Combination Sum (Python)

preview_player
Показать описание
Leetcode Blind Curated 75
Leetcode - Combination Sum

Solving and explaining the essential 75 Leetcode Questions
Рекомендации по теме
Комментарии
Автор

1) For non-Python people, "range" is inclusive on start but exclusive on right. It can be misleading as in Kotlin we use 1..target that is inclusive on both ends.
2) Big O: according to chatGPT+ it's hard to be precise about space complexity as it depends on nature of the input, it settled at: O(target × 2^candidates.length). In terms of time complexity: O(n × target × 2^candidates.length).

Anyone thinks there's better Big O explanation – leave a comment :)

Very cool explanation Tim, thanks.

northridgefield
Автор

it is match more convinient and faster then the recursion way, thanks!

databale
Автор

your videos are always awesome sir. besides, extra clap for whiteboard assisted explanation!! 👏🏻👏🏻👏🏻

darshakmehta
Автор

very thanks for this amazing video, I wanted just to mention that candidates does not have to be sorted, logically I tested and i tested by code too. thanks bro

DiaaHaresYusf
Автор

All your videos are just awesome with best and simple explanation. Also, it would be really great if you could explain explain the Time Complexity and space complexity as well. This is the only extra requirement that every one of your subscriber is wanting from you, please update in description atleast

ritteshpv
Автор

great way to solve this problem! Thank you! the way you code is a little unconventional but the explanation and approach is excellent!

ArunNalluri
Автор

Great vid, clear explanation. Got my sub! Keep them coming!

KBLive
Автор

Dude, you're amazing! Thank you!!!

OverLordOfDardWorld
Автор

great solution, can you explain why is the time complexity is soo less even though there are three loops. Also can we do all the Backtracking problems using DP?

RajSingh-dllk
Автор

that would be great if you could explain on the whiteboard with the example given by leetcode.

wolfwalker_
Автор

smart solution. How did it satisfy the uniqueness?

yilmazbingol
Автор

Amazing explanation! I am just curious how to decide whether a problem can be solved by DP or not? It seems unintuitive to me to try this approach. Do you have any tips on how to tell when it's worthwhile to try this approach?

greyreynyn
Автор

Great video! I am new for python. I am trying to use "blist.append(c)" to replace the "blist+[c]". I got nonetype error. Why?

liwensi
visit shbcf.ru