Skip to content

Interview Experience 51

sggarg edited this page Aug 13, 2017 · 1 revision

Round 1:

Given a sequence of non-delimited sequence of integers given as a string with one integer missing from that sequence, find the missing integer.

Ex: ""9899100102"", ans = 101

Round 2:

How many prefix(P)-suffix(S) pair are there such that set(P)=set(S)

Ex: [1, 2, 3, 1, 2], ans = 10

Round 3:

  • Design a database for company, employee and other details. He added a lot of fields at runtime and made me normalize accordingly. Then asked me how will you index it for elasticsearch and what queries will you do on the data. It was a very open ended question.

  • Given an array, find the turning point. Return -1 if the array is strictly increasing or decreasing. Ex:

    • [23, 40, 50, 45, 40] => 50

    • [90, 85, 70, 80] => 70

    • [1, 2, 3, 4, 5] => -1

Clone this wiki locally