TechSophy Interview Question

3 Puzzles, coding question and sql question.