Turn O(n^2) reverse into O(n) · HackerTrans