IBM interview question

A few leetcode style questions