IBM interview question

They asked 2 Leetcode mediums