IBM interview question

Develop a hard Leetcode question