摘要:
Given a non-negative integer represented as a non-empty array of digits, plus one to the integer.You may assume the integer do not contain any leading 阅读全文
摘要:
Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After remo 阅读全文
摘要:
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.k is a positive integer and is less than or equal to 阅读全文
摘要:
Reverse a singly linked list. 两种办法: 1.头插法。 2.递归。 参考: https://discuss.leetcode.com/topic/13317/accepted-c-solutions-both-iteratively-and-recursively 阅读全文
摘要:
Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5 阅读全文