BlackRock Interview Question

solve two coding question with a basic editor