Deutsche Bank Interview Question

Q: Dynamic Problem with proper implementation in any language