Ad
  • Default User Avatar

    Yep, there was nothing about returning in requirements. So even shorter is possible :)

  • Default User Avatar

    retern is not need there

  • Custom User Avatar

    It seems your program is returning a pivot value when there is none. You may want to check and see if your program works for large lists with similar numbers that contains an even number of elements.

    ints = [1,1,1,1,1,1]
    # Has no index where the pivot has the left and right sums equal to one another
    
    ints = [1,1,1,1,1,1,1]
    #       ^---^   ^---^
    #         3   =   3
    
  • Default User Avatar

    In the final test I am getting 1 as the midpoint sum and I dont really understand how that isn't the correct answer. [1, (1), 1, ...] 1 == 1 when comparing from the index (1) within the parenthesis.