Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 1 /** 2 * Definition for singly-linked ....
分类:
其他好文 时间:
2014-10-21 03:33:45
阅读次数:
168
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:
其他好文 时间:
2014-10-21 02:15:19
阅读次数:
187
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 algor...
分类:
其他好文 时间:
2014-10-21 02:14:37
阅读次数:
266
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first
two lists.
/**
* Definition for singly-linked list.
* publ...
分类:
其他好文 时间:
2014-10-20 21:28:05
阅读次数:
233
problem:Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthe...
分类:
其他好文 时间:
2014-10-20 19:16:49
阅读次数:
182
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-10-20 14:46:35
阅读次数:
230
Problem: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.Yo...
分类:
其他好文 时间:
2014-10-20 13:15:42
阅读次数:
195
[leetcode]Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:
其他好文 时间:
2014-10-20 11:49:53
阅读次数:
114
Linked List Cycle IIGiven a linked list, return the node where the cycle begins. If there is no cycle, returnnull.比I麻烦点的就是找到循环开始点TATI只是判断是否循环。要求不使用额外空...
分类:
其他好文 时间:
2014-10-20 11:40:37
阅读次数:
134
Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your alg...
分类:
其他好文 时间:
2014-10-20 09:49:08
阅读次数:
181