Frage im Vorstellungsgespräch bei Samsung Electronics

Fairly straight forward data structures and algorithm questions.