Surya Software Interview Question

Puzzle (black and white box)