The second time I apply, and the second time I fail in the second interview.
Awesome process.
awesome and very quick: 2 interviews.
interview one:
Q1)Write a function that takes a list of words as input, and returns a list of groups of those words which are anagrams. Groups should not contain duplicates. Two words are anagrams if you can turn one into the other by just rearranging the letters.
Example:
Input: ["star", "rats", "star", "car", "arc", "arts"]
Output: [["star", "rats", "arts"], ["car", "arc"]]
Q2) Write a function that, given n integer intervals [a_i, b_i] on the real axes, where the absolute value of the coordinates is bounded by M, returns a point that belongs to the maximum number of intervals. Point x belongs to the interval [a, b] iff a <= x <= b.
Example:
intervals: [-4, -1] [3, 5] [-5, -3] [-2, 3]
output: 3
(I soleve it in a bad way then asked for a hing to optimize)
Interview two:
Q1: Given two arrays, find common elements Then question about hash table