Panda Guru LogoPanda
Guru

PayPal | SDE 2 | Bangalore | Reject

Round 1: DS-Algo Round

Questions:

Question 1:

Given a map as parameter return a Json String from it, map can have different data types (e.g., String, Number, Boolean, Map, List, etc.). You can't use any standard library or tools (like Jackson); you need to code it up.
Expectation: Workable, modular code. Should output Json String with proper indentation.

Question 2:

Variation of Kadane's Algorithm.

Candidate's Approach
  • For Question 1, the candidate had prior experience with similar code in their company's code base, which involved using recursion and instanceOf methods to construct the Json String. This approach aligned with the interviewer's expectations, and the candidate was able to code it in 35 minutes.
  • For Question 2, the candidate successfully solved the variation of Kadane's Algorithm.
Interviewer's Feedback

The interviewer was happy with the candidate's performance in Round 1.


Round 2: DS Algo, Design and Theory

Questions:

Question 1:

Given an array representing a pile of boxes [4,5,30,11,6] and h = 8, find the optimal pile split so that packing gets done in 'h' number of hours.
Output: 4
For example:
Input: [30,11,23,4,20], h=5
Output: 30

Candidate's Approach
  • The candidate found the question ambiguous and struggled to understand it despite multiple readings. After some time, they identified it as a binary search problem where the goal was to find the optimal size of the pile that would allow packing to be completed in 'h' hours. They determined that the left boundary would be the minimum of the array and the right boundary would be the maximum, then applied binary search on this range. They eventually coded a solution but felt uncertain about their performance in this round.
Interviewer's Feedback

The interviewer seemed unprepared and did not provide clear explanations. The candidate struggled with follow-up questions regarding caching and auto-scaling, which contributed to their feeling of being finished in this round.