Capsule | Phone Screen | SDE 1
		CAPSULE

Q1

Interview Questions
1 question. Given the multidimensional array below and the result and want you to come up with the soltion.
(routeId * courierId * deliveryTime)

input=[
(1, 3, 10),
(1,4, 11),
(1,5, 14),
(2,4,40),
(2,5,60),
(2,6, 20)
]
}

Find the shortest time for each route id
Find the average time for each route-courier combination [1,9.5], [2,50] etc
Find the lowest score for each courier. The score is the difference b/w the average and the fastest time for that route.

Q2

Make a spell checker function, with a string of text to analyze and an array of valid words as input. Output should be an array of any words that are not in the valid word array, any words that are uncapitalized and the first word of a sentence, and any uncapitalized proper nouns, e.g. Robert or Japan.

Comments (0)