Art & Logic Interview Question

Simple integer encoder-decoder