OJ behaves strange for this question

  • 0

    I added this logic in my code

    n = len_list(head)
    if n < 3:
        return head

    and ge this:

    Input: {1}
    Output: Do not return anything, modify the linked list in-place instead.
    Expected: {1}

  • 0

    you should just return, not return head

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.