Count Distinct Subsequences Dynamic Programming | Leetcode Hard Solution

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

NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we discuss the Count Distinct Subsequence problem using dynamic programming. In this problem,

1. You are given a string.
2. You have to print the count of distinct and non-empty subsequences of the given string.
Note - String contains only lowercase letters.

#dp #leetcode #dynamicprogramming

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

Sir, you have got the talent of teaching, hard problems feel like the easy one. Thank you, Sir!

adityahirwani
Автор

Kafi videos dekha sir, but aapki teaching ka level hi alag hai. Aisa hi content banate rahiye. Subscribed you from 5 accounts.

Shubham-xsek
Автор

Great Explanation, I clearly understood everything.
Sir, we could have done this in O(1) space because we don't need the whole DP array only the DP[i-1]. And we can store the value of DP[i-1] in the hash map, instead of storing the index.

kushagrashekhawat
Автор

Thank You So Much Sumeet sir for this wonderful

stith_pragya
Автор

Sir u explained it so nicely sir, but i think watch time of this video is less bcoz even if we watch half video we will understand evrything😍,
The way u tell the intution superb

yourbestie
Автор

Great video and wonderful explanation.
Superb content!!!

paragroy
Автор

thank you sir your way to explain problem and solution is amazing. thank you so much.

MK-rvev
Автор

mene ab se har video pe comment karna hai, "East ho ya west sumeet sir is the best"

factswithai
Автор

now I can solve some problem of DP and Graph. credit goes to you.

MK-rvev
Автор

sir, aapne bohot mast explain kiya hai !

Parth.Deshpande
Автор

lgta tha kbi smj nhi paunga, ab smj agya ek hi bar me

PankajKP
Автор

Great Explanation Sir
Thanks alot for such amazing content

chiragjain
Автор

sir ye questions kya weekly basis pr revise kru ?, kyuki iske liye ya iske jaise 1d dp ke liye coding round mai dimaag kaise chl paega, new question aaega toh sir insight kaise banau?

mickyman
Автор

Awesome explanation ...
covered all insights deeply

shubhamagarwal
Автор

Kya mast samjhya hai maza aa gya thank you so much

deepjoypal
Автор

Hi, you have explained the solution very well. However, I do have a question: In the string 'abc' or 'abcd', we do not have a substring (or subsequence) 'ac'. Then why do we count it?

harshitlamba
Автор

sir how to handle bigger length string testcases

hellorvce
Автор

sir at leetcode (string len <= 2000) taking long type dp array and also even using (dp[i] = ) not work.. means some of testcase goes integer overflow..

rahulranjan
Автор

Plz make a video on counting the subsequences having product less than k

ajayrajput
Автор

sir whenever i was running this in leetcode platform i was getting error for some test cases for which the string is very large but it is working fine in pepcode platform, could u help me

dineshteja
welcome to shbcf.ru