Panda Guru LogoPanda
Guru

Amazon SDE-L5

Round 1

Questions: Suppose your team is building a new video codec for amazon prime video. One of the steps to build this is to extract information from a very large database of videos. You are assigned to create a component that reads from a stream of ‘video frames’ and returns a list of integers which were repeated in the previous k video frames. The way you have to read the video is through a stream object which is provided.

stream = [1, 2, 3, 4, 2, 1, 1, 2, 4] k = 4 output = [2, 1, 2]
public interface Stream { // Returns True if stream contains next element or False if end-of-stream. Boolean hasNext(); // Returns next element of Stream. Integer next(); }
Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Round 2

Questions: Can you write me a function to take a string and decrease all costs in the string by 15%? Example string could be “Mary spent $5.25 on MP3s this week”. Currencies can be of the form $5.25, $ 5.25, and USD 5.25. Our solution must work for these currency formats but let us keep in mind that we want to extend the solution to work for international currencies as well, for e.g., EUR, GBP etc. You are given a string containing product information and its price. Write a function which returns the same sentence but with a reduced price.

Input example: “Two liter Coco-cola costs $2.99.” output: “Two liter Coco-cola costs $2.54.”

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Round 3

Questions: Write a small library which allows:

  1. Registering callbacks for future (on-time) execution, by specifying a function, an optional argument, and time in seconds (relative to now) when the callback should be run.
  2. An execute function which should execute (call) all due callbacks.

Only system call allowed is the current time.

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Round 4

Questions: Design a monitoring platform.

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.