Dandelion Energy interview question

Leetcode question and then development