码迷,mamicode.com
首页 >  
搜索关键字:search    ( 12380个结果
Search Insert Position
问题:一个数应该插入到有序数组的哪个位置class Solution {public: int searchInsert(int A[], int n, int target) { int i; for(i=0;i<n;i++) if(target<=A[i]) b...
分类:其他好文   时间:2014-08-01 22:57:22    阅读次数:204
Convert Sorted List to Binary Search Tree leetcode java
题目:Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.题解:之前做过一道是从sorted array转换到BinarySearc....
分类:编程语言   时间:2014-08-01 04:54:21    阅读次数:310
Unique Binary Search Trees II leetcode java
题目: Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return....
分类:编程语言   时间:2014-08-01 04:53:31    阅读次数:279
Unique Binary Search Trees leetcode java
题目:Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique B....
分类:编程语言   时间:2014-08-01 04:53:11    阅读次数:272
Word Search leetcode java
题目:Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "ad....
分类:编程语言   时间:2014-08-01 02:20:41    阅读次数:236
代写程序|java二叉树字典查询(qq 928900200)
This assignment will help you practice and understand better the Binary Tree and Binary Search Tree data structures, their operations and implementati...
分类:编程语言   时间:2014-07-31 23:20:10    阅读次数:270
[leetcode]Convert Sorted Array to Binary Search Tree
Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.算法:根据有序数组,生...
分类:其他好文   时间:2014-07-31 23:20:00    阅读次数:270
CentOS安装Erlang
1.首先要安装编译源码用的编译器gcc&g++,安装方式很简单,先用yum search gcc搜索出包,然后选择适合自己的版本复制全名,用yum intall gcc_XXX来进行安装即可。2.安装openssl以及ncurses-devel。安装方式和1一样。3.从这里http://www.er...
分类:其他好文   时间:2014-07-31 23:18:20    阅读次数:254
[leetcode]Recover Binary Search Tree
Recover Binary Search TreeTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A sol...
分类:其他好文   时间:2014-07-31 23:13:00    阅读次数:223
[leetcode]Validate Binary Search Tree
Validate Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtre...
分类:其他好文   时间:2014-07-31 23:11:40    阅读次数:225
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!