Amazon SDE 2 Onsite

question 1) implement prefix search with dictionary of priorities

dictionary:

[] {amazing, 10}
{amazon, 5}
{amazonian, 3}

create class
create your own search structure
and also method with parameter
of prefix like "A", "AM", "AMAZONI", etc.


  1. Write a function that given two dates
    returns -1 if they are less than a month apart,
    0 if they are exactly a month apart, and
    1 if they are greater than a month apart.

3)Design a User signon limiter for Amazon Prime. (very vague requirements, but basically how to ensure that a maximum of X users are using a particular Prime Video account at any one time.)

  1. code up a user class for a social network, and
    Using your social network, and given a Users object, write an algorithm that allows you to
    fetch all friends at k-depth? (e.g. friend of a friend is depth 2)
Comments (4)