Panda Guru LogoPanda
Guru

Mercari Senior Backend OA

Round 1

Questions:

  1. Similar to 01 Knapsack, a Target Sum T is given along with an array of numbers A. The task is to give the maximum possible sum of numbers we can take from array A so that their sum does not exceed T. Given the constraint of A's size was 10^5, an O(N^2) solution didn't pass all test cases.

  2. Given a Weighted Directed Graph, first find the minimum cost path between two points A and B. Let the cost of the path be T. Now find all paths P between A and B that have weight T. For all the edges, return whether that edge is used in any of the paths P.

  3. Call one API that is paginated and return some response by parsing and performing operations on the JSON response. The API was given in the question. The solution was easy, but the HackerRank Platform IDE was challenging as you couldn't use RestTemplate; you had to use HttpRequest and URI. If you don't remember the syntax, it is very hard to solve since the HackerRank IDE wouldn’t help.

  4. The exact question was not remembered, but it was related to Dynamic SQL. Given a Students table with Name, Subject, and Marks as columns consisting of multiple entries for a student, where Subject is an enum, for any student, if there are n subjects, the marks of all n subjects would be given in the table. You need to return a response with the following columns: Name, Eng, Math, French, etc. That is, Name is the student entry, and Subject is all the n unique subjects in the Student table as column names, with each student having one entry.

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.