def startEnd(length, start, end):
    """Helper function to normalize the start and end of an array by counting from the end of the array (just like Python).

    :type length: non-negative integer
    :param length: length of the array in question
    :type start: integer
    :param start: starting index to interpret
    :type end: integer
    :param end: ending index to interpret
    :rtype: (non-negative integer, non-negative integer)
    :return: (normalized starting index, normalized ending index)
    """
    if start >= 0:
        normStart = start
    else:
        normStart = length + start
    if normStart < 0:
        normStart = 0
    if normStart > length:
        normStart = length
    if end >= 0:
        normEnd = end
    else:
        normEnd = length + end
    if normEnd < 0:
        normEnd = 0
    if normEnd > length:
        normEnd = length
    if normEnd < normStart:
        normEnd = normStart
    return normStart, normEnd
