← Back to experiences
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/experiences/…$
One Screen-round Interview (Virtual - Onsite).
Status: 4 years experience. Position: Software Engineer 2 Date: Spe - 5 - . 45 Mins - Interview
Two Problems:
Problem One: Similar to Random Pick with Weight Create a function that takes a HashMap as an argument and picks one person randomly from one of these states. The weight of each state in this random selection depends on the population in this state. Example: Map<String, Integer> cities = <"NY", 7> <"LA", 5> <"MA", 8> || String: is the City Name, Integer: the population in each State.
Problem Two: Merge Sorted Arrays Merge three sorted arrays into one sorted array and remove duplicates in the final result.