IBM Interview Question

2 DSA questions through hackerrank.