Coding practice from leecodeoj