Fidelity Investments interview question

In the Tech Interview ,I couldn't answer a few puzzles.