Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. Example 2 1->2->3 => / \ 1 3 分析:非常简单,用递归 ...
分类:
其他好文 时间:
2016-07-03 07:03:00
阅读次数:
113
Merge two sorted (ascending) linked lists and return it as a new sorted list. The new sorted list should be made by splicing together the nodes of the ...
分类:
其他好文 时间:
2016-07-03 07:02:32
阅读次数:
131
Find the nth to last element of a singly linked list. The minimum number of nodes in list is n. Find the nth to last element of a singly linked list. ...
分类:
其他好文 时间:
2016-07-03 07:01:32
阅读次数:
171
Remove Duplicates from Sorted List I Given a sorted linked list, delete all duplicates such that each element appear only once. Remove Duplicates from ...
分类:
其他好文 时间:
2016-07-03 07:01:05
阅读次数:
144
Given a list, rotate the list to the right by k places, where k is non-negative. Given a list, rotate the list to the right by k places, where k is no ...
分类:
其他好文 时间:
2016-07-03 07:00:45
阅读次数:
161
不能用str(list),t=['\x87\xe9\xa5\xb0\xef\xbc']In [28]: str(t)Out[28]: "['\\x87\\xe9\\xa5\\xb0\\xef\\xbc']"要用‘’.join(list)In [29]: ''.join(t)Out[29]: '\x8 ...
分类:
编程语言 时间:
2016-07-03 07:00:00
阅读次数:
142
Given a linked list, remove the nth node from the end of list and return its head. Notice The minimum number of nodes in list is n. Have you met this ...
分类:
其他好文 时间:
2016-07-03 06:56:13
阅读次数:
121
Sort a linked list using insertion sort. Sort a linked list using insertion sort. Sort a linked list using insertion sort. Example Given 1->3->2->0->n ...
分类:
其他好文 时间:
2016-07-03 01:43:18
阅读次数:
210
1、java.util.Collection 是一个集合接口(集合类的一个顶级接口)。它提供了对集合对象进行基本操作的通用接口方法。Collection接口在Java 类库中有很多具体的实现。Collection接口的意义是为各种具体的集合提供了最大化的统一操作方式,其直接继承接口有List与Set ...
分类:
编程语言 时间:
2016-07-03 00:21:01
阅读次数:
170
linux常用命令:(1)ls(list,列表)作用:使用列表把当前文件夹下所有文件显示出来 ls-a 显示所有文件,包括隐藏文件 ls-l 以详细信息显示 ls-a-l ls-l-a ls-la ls-al 四种方式都是可以的 (2)cd(changedirectory,更改目录)作用:用来切换目录涉及到相对路径和绝对路径cd.. ..
分类:
系统相关 时间:
2016-07-02 23:04:19
阅读次数:
266