IMC Trading interview question

Two easy medium coding questions.