Greenphire interview question

one short leetcode filtering problem