Intuit Interview Question

programming questions and about logics behind