Does in-place means no fake head?

  • 0

    I always use a fake head when manipulating linked list. I think it's a good way to avoid head==null edge case. But does that mean I am using extra memory which obey in-place?

  • 0

    Confused about that too. Fake head is also useful when the head is swapped.

Log in to reply

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