An interesting problem about TLE


  • 0
    X

    That is when I use the code like this on my custom case:

    bool isPalindrome(ListNode* head) {
    int num = 0;
    head->next->next = head;
    return true;
    }

    It always shows TLE.
    Note that it is not RE, and the custom case I use is [1,2,3].
    Can anyone solve this problem?


Log in to reply
 

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