Deutsche Bank interview question

Leetcode easy/medium questions, relatively straightforward. Was not asked to implement