All Questions
6 questions
3
votes
2
answers
267
views
Longest common subsequence solution
I've seen this today on a mock interview and wanted to give it a try. I'd love to hear some feedback from you guys. This is my second attempt at the problem, initially I had a mess of ...
3
votes
1
answer
10k
views
Solving maze problem with backtracking solution using stack
I solved the maze backtracking question using a stack however could not find any other solution like that anywhere (to validate my solution is actually a valid one).
The problem statement is as ...
0
votes
2
answers
971
views
Number of Paths (BackTracking) in Java
Illustration
You're testing a new driverless car that is located at the Southwest
(bottom-left) corner of an n×n grid. The car is supposed to get to the
opposite, Northeast (top-right), corner ...
2
votes
1
answer
2k
views
Regular Expression Matching: Recursive and DP-based implementation
Problem Statement:
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching ...
2
votes
1
answer
208
views
0-1 Knapsack in Java
I'm looking for advice on coding practices in general.
...
7
votes
2
answers
4k
views
Finding alternating sequence in a list of numbers
Please be brutal and treat this as me coding this up for an interview.
A sequence of numbers is called a zig-zag sequence if the differences between successive numbers strictly alternate between ...