Fidelity Investments Interview Question

They asked me a code related to dynamic programming and a few easy puzzles.