a fizz-buzz problemJob interviews sometimes contain simple programming tasks. Often called “fizz-buzz problems,” the usual purpose is to quickly weed out hopefuls who can’t actually program anything.Here’s an example, something that might be used in a phone screen or an in-person interview with programmers early in their career:Write amergefunction, that given two sorted lists, produces a sorted list containing the union of each list’s elements. For example:merge([1,7,11,17],[3,5,13])//=> [1, 3, 5, 7, 11, 13, 17]merge([2,3,5,7,11],[2,4,6,8,10,12,14])//=> [2, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14
...
继续阅读
(15)