REX Interview Question

A few algorithmic questions during tech/phone interview