AppDynamics Interview Question

Standard algorithm leetcode medium