that makes my life easier. In my opinion, to test whether is a palindrome, we just need to have a test function to go over the substring and determine whether this substring is palindrome or not.
@hoyinli74622 жыл бұрын
you are the only 1 DP solution I really understand! Thank you!
@IDeserve2 жыл бұрын
Thanks Ho Yin Li!!
@gyanasahu10063 жыл бұрын
There is a better approach to constructing this dp table. The flaw here is we are constructing row by row and we have to look at row + 1 for updating dp[row][1..]. Do it by length, which is more intuitive. Below is the code: for(int i=1; i
@34_harshdeepraghuwanshi983 жыл бұрын
Awesome 15 min explanation
@IDeserve3 жыл бұрын
Thanks Harshdeep!
@anmoljain58463 жыл бұрын
thank you, sir. I was trying to get it from many resources, finally, I got it through this video
@IDeserve8 жыл бұрын
Dear Friends, If you like our content and would like us to continue making great content for you, please spread the word about IDeserve. A share/appreciation from you on social network would mean the world to us! Also, do like our Facebook page: facebook.com/IDeserve.co.in :) Thanks, -Team IDeserve.
@aadityasharma97902 жыл бұрын
you deserve more subscriber man!
@IDeserve2 жыл бұрын
🥺
@aniket75124 жыл бұрын
God Level Explanation. Thanks bro was finding this whole day !
@IDeserve4 жыл бұрын
Wow! Thanks Aniket!
@aniket75124 жыл бұрын
@@IDeserve Bro u truly deserve it. I guess that's why u named d channel IDeserve😂....Jokes apart keep uploading great content 😊 ATB
@himanshusrihsk43024 жыл бұрын
Best Explanation ever. Sir plz provide solutions for problem in leetcode medium and hard questions
@bhavukgarg36195 жыл бұрын
Sir your videos are always helpful, Just got to search for that ideserve logo, and my doubts are clear.
@IDeserve5 жыл бұрын
Thanks for your kind words Bhavuk!
@NitinSingh-hk3vy2 жыл бұрын
Thanks brother, this video helped me a lot🙌. Keep doing 👍
@IDeserve2 жыл бұрын
😊
@pathikritchanda623 жыл бұрын
Thank you sir for this approach , hope for such great content in future too .
@namanvijay35143 жыл бұрын
Best explanation 👍
@Ice-27064 жыл бұрын
Thanks bro and keep posting more videos they are helpful !!
@sujan_kumar_mitra3 жыл бұрын
Nice Explanation
@karthiknedunchezhiyan51367 жыл бұрын
Instead of keeping boolean matrix it is easy to count the minimum cut in matrix itself..... then return top right corner value
@lifehacks94504 жыл бұрын
Please upload more why did u stopped
@mohakchaudhary19815 жыл бұрын
Best explanation of this problem 🎈⚡⚡😀
@IDeserve5 жыл бұрын
Thanks Mohak!
@haimbendanan8 жыл бұрын
Why is the brute force n^3 ? All the string partition possibilities aren't 2^(n-1) ? Or am I missing something? Thanks!
@11m08 жыл бұрын
I dont get it either...Did u figure this out?
@neerajjoshi94937 жыл бұрын
actually brute force here refers to another DP approach which is not as good as this DP approach.
@manjesh806 жыл бұрын
Its n^2 + n^2 . === n^2 ... compare to other approaches .. which is n^3 If n = 1000 n^2 ==> 1000000 ==> 1 Million n^3 == 1000000000 ==> 1 Billion n^2 + n^2 ==> 2 Million
@shiwanggupta86086 жыл бұрын
Actually its not brute force..using brute force it would be O(n*2^n) using dynamic programming we can achieve O(n^2) using different approach www.geeksforgeeks.org/dynamic-programming-set-17-palindrome-partitioning/
@anonymoussloth66872 жыл бұрын
Brute force would be 2^n because u r not checking all substrings. U r checking all valid cuts. You have n positions where you can place the cut and you have two options at each position to cut it or not cut it
@ameyapatil11394 жыл бұрын
Excellent work !
@harveylastname15238 жыл бұрын
The table of 2D information is not used all, you can save the integer but not boolean only.Save the min(T[i][j] = 1+ Min(T[i][k] , T[k][j-1]) to the table 2D, so the T[i][j] is the answer.
@Vinny2543 жыл бұрын
Tried to print the substrings ... anyone managed to get the minimum substrings as a list instead ?
@chrisogonas3 жыл бұрын
WOW, that was helpful. Thanks
@kushal14 жыл бұрын
Great video... Just one thing I didn't get the intuition behind dp[j] + 1. Difficult to understand. Dry run makes little more sense but still. Could have been explained better.
@falakk227 жыл бұрын
Amazing , please keep adding more probs . Is there any book that we should refer to look out for such questions ? Any recommendation . Thanks .
@vorasagar76 жыл бұрын
solve leetcode or use ctci for questions
@rishitgupta78483 жыл бұрын
Thank you!
@SurendraSingh-hp9gk5 жыл бұрын
thank you ideserve.
@08JuHan4 жыл бұрын
great tutorial! thanks a lot for your help
@IDeserve4 жыл бұрын
Thanks!
@sajalagrawal14304 жыл бұрын
@@IDeserve why have you stopped uploading?
@varunnarayanan87204 жыл бұрын
Well explained..
@justanaverageguy47394 жыл бұрын
this is O(n^3) solution right?
@Sushil28744 жыл бұрын
Nice explanataion..!!
@IDeserve4 жыл бұрын
Thanks Sushil!
@vicentefelipe42877 жыл бұрын
loved this video, super helpful, can you do Palindrome Partitioning, where you return all possible palindrome partitioning of s. For example, given "aab". return [["aa","b"], ["a","a","b"]]
@mkay78003 жыл бұрын
Its Awesome 🔥🔥
@karthiksharma87205 жыл бұрын
Sir you are awsome
@IDeserve5 жыл бұрын
Karthik you are awesome 😊
@varunkunchakuri12048 жыл бұрын
i don't think there is brute force way of o(n^3) please check
@pownarthithimiridayasagar22298 жыл бұрын
I think, by Brute force they mean calculating min cut for every possible substring in the string.
@bipul21384 жыл бұрын
That one is also based on DP
@lemonginger0016 жыл бұрын
explained nicely :)
@IDeserve6 жыл бұрын
Thank you so much Yash for your kind words :)
@ZiiiP21427 жыл бұрын
Awesome.
@IDeserve7 жыл бұрын
Thanks primaltare for your kind words :) We would really appreciate if you could spread the word about IDeserve in your college and to your colleagues. Also please check out our website at: www.ideserve.co.in It has features like Algorithm Visualization, Learn Together and many more coming soon. Please check it out and leave us a comment there! Thanks, -Team IDeserve.
@shaivalchokshi34249 жыл бұрын
Nice, thank you :)
@IDeserve9 жыл бұрын
+shaival chokshi Thanks a lot for your words! It is very encouraging to hear such comments! We would really appreciate if you could spread the word about IDeserve in your college and to your colleagues. Also please check out our website at: www.ideserve.co.in It has features like algorithm visualizations, learn together and many more coming soon. We are uploading new topics everyday. Please check it out and leave us a comment there! Thanks, -Team IDeserve.
@shaivalchokshi34249 жыл бұрын
Yes, i've been watching a lot of videos of yours :) they're all too helpful