Pregunta de entrevista de Cotality

Basic C# questions, simple algorithms, find bugs in a given code