Thirdera interview question

simple intermediate difficult easy and somewhat tricky.