01Phone Screenwith SWETechnical45 minMedium
Interviewer: SWE
Had to solve two leetcode questions in 45 minutes, one easy and the other hard difficulty. Didn't make it to the next round.
Question #1:
Largest common substring: Given two strings, s1 and s2, find the length of the largest substring that is common between the two strings.
Input:
s1 = "hello"
s2 = "yellow"
Output: 2 # common substring is "llo"Questions #2:
Minimum remove to make valid parentheses: given a string s consisting of lowercase english characters and parentheses ( and ), remove the minimum number of parentheses to make the string valid.
Input:
s = "(a(b(c)d)"
Output:
"a(b(c)d)"