All Questions
7 questions
3
votes
1
answer
273
views
Longest Palindromic Substring | Python Code Giving TLE
Problem Statement
Given a string s , return the longest palindromic substring in s.
Constraints
...
1
vote
2
answers
141
views
9
votes
1
answer
2k
views
LeetCode on Longest Palindromic Substring in Python
This is a programming question from LeetCode:
Given a string s, return the longest palindromic substring in s.
Example 1:
Input: s = "babad" Output: "bab" Note: "aba" is ...
2
votes
1
answer
87
views
Length of the longest common sub sequence bottom up
Could I get some feedback on this code? I included a test case as well.
This code computes the longest common sub sequence given paired data, it was not part of any challenge I just did it to learn ...
3
votes
1
answer
1k
views
Minimum window subsequence LeetCode dynamic programming solution
Given strings S and T, find the minimum (contiguous) substring W
of ...
6
votes
2
answers
2k
views
Length of longest palindrome subsequence
I had an interview, where I was asked to solve to this question:
Given an string str, find the maximum length of palindrome subsequence.
Example: >if str = 'abcda':
maximum_length = 3 'aca'
How ...
2
votes
1
answer
585
views
Longest common substring using dynamic programming
I've written a short python script that attempts to solve the problem of finding the longest common substring using the dynamic programming technique. It is meant to be generalised so I could plug in ...