Google Interview Question

2 simple tasks - one based on recursion, one based on array traversal