Solving nice tricks from interview questions