Sahi Softtech Inc interview question

Basics about DSA, some puzzles