def collatz_sequence_length(starting_value: int) -> int:
    """
    Given solution relies on just calculating the length, which takes out the longer and more
    expensive collatz calculation that requires storing the sequence. Passing the integer parameter
    is cheaper than storing, appending, and passing a list data structure.
    :param starting_value: the integer in the collatz
    :return: returns the length
    """
    if starting_value < 2:
        return 1
    if not starting_value % 2:
        return 1 + collatz_sequence_length(starting_value // 2)
    return 1 + collatz_sequence_length(3 * starting_value + 1)