Thursday, October 6, 2016

Uber interview Questions

1. Telephonic Round

1) Design an expiry cache similar to redis cache.
http://blog.gainlo.co/index.php/2016/05/17/design-a-cache-system/

2) Add 1 to a linked list

A number is represented in linked list such that each digit corresponds to a node in linked list. Add 1 to it. For example 1999 is represented as (1->9->9->9) and adding 1 to it should change it to (2->0->0->0).
http://www.geeksforgeeks.org/add-1-number-represented-linked-list/

3) Given a array in which numbers are in the unsorted order, find if any triplet a, b , c  exist such that x < a+b+c < y.

For example, let's say array is:
0.5, 0.1, 1.1, 0.9, 12, 12, 98
Check whether any triplets exist where 1 < a+b+c < 2