摘要:
Given a linked list, remove the n th node from the end of list and return its head. For example, Note: Given n will always be valid.Try to do this in 阅读全文
摘要:
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 思路:这题最容易想到的是,(假设有k个链表)链表1、2合并,然后其结果12和3合并,以此类推,最后是1 阅读全文
摘要:
Given a linked list, swap every two adjacent nodes and return its head. For example,Given1->2->3->4, you should return the list as2->1->4->3. Your alg 阅读全文
摘要:
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then l 阅读全文
摘要:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single 阅读全文