码迷,mamicode.com
首页 >  
搜索关键字:sorted lists    ( 7805个结果
LeetCode: Add Two Numbers
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 ...
分类:其他好文   时间:2014-06-28 14:31:12    阅读次数:201
[LeetCode] Add Two Numbers
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 ...
分类:其他好文   时间:2014-06-28 10:45:34    阅读次数:225
Leetcode Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.TreeNode *createSearchTree(ListNode *&hea...
分类:其他好文   时间:2014-06-26 00:12:57    阅读次数:289
Leetcode Merge Sorted Array
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal...
分类:其他好文   时间:2014-06-25 23:01:44    阅读次数:227
Java连接redis的使用演示样例
Java连接redis的使用演示样例 Redis是开源的key-value存储工具,redis通经常使用来存储结构化的数据,由于redis的key能够包括String、hash、listset和sorted list。 Redisserver眼下最稳定的版本号是2.8.9,能够到官网http://r...
分类:编程语言   时间:2014-06-25 22:19:07    阅读次数:355
排序算法比较和选择
排序算法有不少,当然,一般的语言中都提供某个排序函数,比如Python中,对list进行排序,可以使用sorted(或者list.sort()),关于这方面的使用,在我的github代码库algorithm中有几个举例,有兴趣的看官可以去那里看看(顺便告知,我在Github中的账号是qiwsir,欢迎follow me)。但是,在某些情况下,语言中提供的排序方法或许不适合,必须选择某种排序算法。 ...
分类:其他好文   时间:2014-06-24 18:33:33    阅读次数:205
数据结构快速回顾——二叉查找树
二叉查找树(Binary Search Tree),也称有序二叉树(ordered binary tree),排序二叉树(sorted binary tree),是指一棵空树或者具有下列性质的二叉树:若任意节点的左子树不空,则左子树上所有结点的值均小于它的根结点的值;任意节点的右子树不空,则右子树上...
分类:其他好文   时间:2014-06-24 12:21:17    阅读次数:257
Remove Duplicates from Sorted List II [详细分析]
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1-...
分类:其他好文   时间:2014-06-22 22:57:49    阅读次数:347
leetcode——Search for a Range 排序数组中寻找目标下标范围(AC)
Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found ...
分类:其他好文   时间:2014-06-22 21:47:15    阅读次数:269
leetcode__Convert Sorted List to Binary Search Tree
Convert Sorted List to Binary Search Tree  Total Accepted: 12283 Total Submissions: 45910My Submissions Given a singly linked list where elements are sorted in ascending order, convert it...
分类:其他好文   时间:2014-06-21 23:57:00    阅读次数:351
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!