IBM Interview Question

2 easy to medium coding questions