CTCI question solutions by Ryan Sun