Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number of elements initialized in nums1 and num ...
分类:
其他好文 时间:
2019-03-30 13:31:06
阅读次数:
139
题目如下: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tre ...
分类:
其他好文 时间:
2019-03-30 10:34:52
阅读次数:
158
题目如下: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balance ...
分类:
其他好文 时间:
2019-03-30 10:34:39
阅读次数:
115
很多时候读开源的库就是为自己准备大量的代码库,优秀开源项目代码质量比绝大部分人的代理质量都要高。 依赖的库 ```import ( "hash/crc32" "sort" "strconv")``` 基本的结构```type Hash func(data []byte) uint32 type Ma ...
分类:
系统相关 时间:
2019-03-30 10:31:59
阅读次数:
147
恢复内容开始 [LeetCode]21 Merge Two Sorted Lists 合并两个有序链表 Description Merge two sorted linked lists and return it as a new list. The new list should be made ...
分类:
其他好文 时间:
2019-03-30 01:34:07
阅读次数:
196
能够把函数当成参数传递的参数就是高阶函数 map reduce sorted filter ...
分类:
其他好文 时间:
2019-03-28 00:49:07
阅读次数:
190
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i ...
分类:
其他好文 时间:
2019-03-25 01:26:51
阅读次数:
219
''' 定义一个函数,可以对传入的数据进行排序, 通过传入的参数来判断决定是正向排序还是反向排序,并打印输出 ''' #代码1: d= input("请输入你的选择:") d = int(d) a = [2,3,1,5,0,8] def func(): if d == 1: print((sorte... ...
分类:
其他好文 时间:
2019-03-24 21:26:46
阅读次数:
193
1.lambda 匿名函数 zrf = lambda x:x**2 ret = zrf(10) #这里面实际上还是有函数名 print(ret) 2.sorted 排序(list也自带排序功能) 排序函数 sorted(iterable,key=函数名,reverse=False) key:把里面的 ...
分类:
编程语言 时间:
2019-03-24 20:04:56
阅读次数:
234