Round 1: the original LeetCode problem, longest-increasing-path-in-a-matrix.
Debugging wasn't very convenient. I also had to write my own test cases and my own main, so that held me up for a long time and I didn't have enough time.
At the end I brought up the optimal solution, using memoization to record results, but I was out of time.
Given an
m x nintegersmatrix, return the length of the longest increasing path inmatrix.From each cell, you can either move in four directions: left, right, up, or down. You may not move diagonally or move outside the boundary (i.e., wrap-around is not allowed).
Constraints:
m == matrix.lengthn == matrix[i].length1 <= m, n <= 2000 <= matrix[i][j] <= 2^31 - 1
Some Java basics: what is polymorphism, monolithic vs microservices, and some other Java questions.
Some background from my resume.
Round 2: a greedy problem. I used a HashMap to store things and went through it with one for loop. Then I ran out of time; I'm guessing there was a second question too.
Round 3: walk through a design from my resume. They asked about it in a lot of detail.
Design an inventory service. The problem was very vague; it was mainly about how you design the SQL data tables.
Once you've designed it, they ask what interesting analytics you could do with it. Mostly pretty free style.
You have to lay out yourself which functional and performance requirements it needs to satisfy.
Overall it didn't feel that hard, but I hadn't interviewed in a long time, so I completely blew up.
Discussion
Loading comments…