you're given k v pairs
funA: ['int','bool']
funB: ['int','int']
and queries like ['int','int']
return all functions that match the description
follow-up
you're also given a flag is variadic
funA: ['int','bool'] , isVariadic: true
funC: ['int','int'] , isVariadic: false
funB: ['int','int','int'] isVariadic: true
and queries like ['int','int']
return all functions that match the description
e.g
['int','int'] = funC
['int','int','int', 'int'] = funB
You're given a time based kv store,
window = 5 sec
time
1 put("foo", 1)
3 put("bar", 2)
4 get("foo") -> 1
5 getAverage() -> 1.5
7 get("foo") -> -1 (since key expired)
8 getAverage() -> 2 (since foo expired)
expectation was to optimize get() and getAverage()
write code for a sudoku validator
- needs to mem efficient so use map to store counts
- print row/col/box as well where sudoku is not valid
- have a check to see if number is between 1-9
follow-up: write code for a sudoku solver
- normal as leetcode use backtracking
questions around scaling
how to detect bottlenecks in system and how to remedy them
Round 5
HM Round
behavioural questions