Greetings,
Sorry I'm a bit late.
This week I've chosen a medium difficulty problem which I remember (vaguely) someone here mentioning they've had asked before in a technical interview, it had some traction with people commenting on his code etc. So it has some more relevance perhaps than the others.
5. Longest Palindromic Substring - https://leetcode.com/problems/longest-palindromic-substring/description/
How it works/Rules:
Sorry I'm a bit late.
This week I've chosen a medium difficulty problem which I remember (vaguely) someone here mentioning they've had asked before in a technical interview, it had some traction with people commenting on his code etc. So it has some more relevance perhaps than the others.
5. Longest Palindromic Substring - https://leetcode.com/problems/longest-palindromic-substring/description/
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
Example 1:
Code:Input: "babad" Output: "bab" Note: "aba" is also a valid answer.
Example 2:
Code:Input: "cbbd" Output: "bb"
How it works/Rules:
- We use the random question picker (sometimes), and all attempt it, one question a week.
- No cheating/looking at the editorial solution until your soln is accepted on leetcode, and you're convinced you can't get it any quicker.
- Language is up to you, this may help people appreciate other languages as well
- Only post your time taken, language, and percentage of submissions beaten at first. Use spoiler+php tags for your code.
Last edited: