leetcode
只手阳光
终身学习,向死而生,懂得休息。
展开
-
leetcode_19. Remove Nth Node From End of List
题目描述:Given the head of a linked list, remove the nth node from the end of the list and return its head.Follow up: Could you do this in one pass?Example 1:Input: head = [1,2,3,4,5], n = 2Output: [1,2,3,5]Example 2:Input: head = [1], n = 1Output: []原创 2021-01-21 09:54:11 · 76 阅读 · 0 评论 -
Leetcode_2.Add Two Numbers
题目描述:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.You may assume the two n原创 2021-01-20 15:34:33 · 94 阅读 · 0 评论