Ruby codes from Think Complexity by Allen B. Downey