L17. Palindrome Partitioning | Leetcode | Recursion | C++ | Java

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

In case you are thinking to buy courses, please check below:

Use Code "TAKEUFORWARD" to get 10% of on subscription

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

All i can say is you have blessings of thousands of students, you are doing an excellent work, you inspire us to work hard, Thanks a lot, wish u have a speedy recovery :).

namangirdhar
Автор

Thank you so much for such a great collection of recursion problem and describing how to pick the approach.

laxminarayanchoudhary
Автор

Instead of calling the isPalindrome(String s) function again and again to check weather the partitioned string is palindrome or not, we can use some precomputations.
A boolean array of size N * N (lets call it dp) can be used to pre-compute weather a substring from index i to j (s.substring(i, j+1)) is a palindrome or not. It will be stored in dp[i][j] as either true or false.
This will boil down the additional O(N) required by isPalindrome() function to O(1).

ayushmamgain
Автор

bro, bcoz of u I got the confidence, that DSA is no Rocket Science and could be solve with ease if we have proper guidance and community.

Thanks man!! God Bless, , btw completed Graphs, Trees and DP series it was amazing!! thanks a ton

Saurabh-febg
Автор

Time Complexity is O( N * 2^N) where N to store the path in ans and 2^N for generating subsequence And the Space Complexity is O( N * N ) , where N to store subsequence in path vector and N for recurssion tree.

pragneshamadavadi
Автор

Great explanation i have ever seen on backtracking related problems🎇🎇

karthikk
Автор

The time complexity of the algorithm for generating all possible palindromic partitioning is typically expressed as O(n * 2^n), where n is the length of the input string. This complexity arises because there can be 2^n possible partitions, and for each partition, we need to check if each substring is a palindrome, which takes O(n) time in the worst case.

surendrapandey
Автор

Super helpful. I think you missed the time complexity analysis

anirudhatalmale
Автор

Love you bhaiya, video abhi dekhi nahi h puri,
Just want to tell you that you are our warrior, our savior ♥️💎 Hope you have a speedy recovery brother✨♥️

shivangisrivastava
Автор

Thanks bro u are doing great day by day...u are the best tutor on this platform in field of coding ...

ushakumari
Автор

This is by far the best placement series!

bhaveshkumar
Автор

Please also include Time complexity analysis, i find it difficult to do for recursive problems.

lasanihussain
Автор

@Striver bhai yaar gajab samjhaye ho sb aasan ho gya h

rydum
Автор

boht achha tha bhaia dil khush hogya thanku 4 ur jb job lgegi sbse pehle aap hi ko

sakshamsengar
Автор

Great explanation of backtracking. Now I understand where I made a mistake in my code. Thank you

DigvijaySingh-uuyd
Автор

I did not need to look for the code after understanding the whole explanation. Amazingly explained

AniRec-eu
Автор

Nice explanation a lot for the video....I got highly motivated when I see the amount of hardwork that you are doing in your life.You are my rolemodel.

paragroy
Автор

Thanks, Your way of explaning is really great

AnkitKumar-ysvs
Автор

Wonderfull, Quality Content ...Waiting for the next videos..Its a humble request please make videos faster so that we can complete it till our placements(june)..Please thanks a ton for such wonderfull content.

atharvakulkarni
Автор

learning through all your videos and liking your videos too.please make solutions of heaps on SDE SHEET:)

ayushuniyal