Great algorithm, Simple and elegant