IBM Interview Question

What are the solutions to these 3 leet code questions?