摘要:
Source Problem Reverse a linked list from position m to n. Example Given 1->2->3->4->5->NULL, m = 2 and n = 4, return1->4->3->2->5->NULL. Note Given m 阅读全文
摘要:
Source Reverse a linked list. Example For linked list 1->2->3, the reversed linked list is 3->2->1 Challenge Reverse it in-place and in one-pass 题解1 - 阅读全文
摘要:
Source Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Example Given 21->10->4->5, tail connects to no 阅读全文
摘要:
Source Given a linked list, determine if it has a cycle in it. Example Given 21->10->4->5, tail connects to node index 1, return true Challenge Follow 阅读全文
摘要:
Source Given a linked list, remove the nth node from the end of list and return its head. Note The minimum number of nodes in list is n. Example Given 阅读全文
摘要:
Source Given two numbers represented by two linked lists, write a function that returns sum list. The sum list is linked list representation of additi 阅读全文
摘要:
Source You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that t 阅读全文
摘要:
Source Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preser 阅读全文
摘要:
Source Write a removeDuplicates() function which takes a list and deletes any duplicate nodes from the list. The list is not sorted. For example if th 阅读全文
摘要:
Source Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example Given 1 阅读全文