Block Interview Question

Random pair programming problems. Nothing difficult.