码迷,mamicode.com
首页 >  
搜索关键字:unique binary search    ( 26218个结果
【LeetCode】- Search Insert Position(查找插入的位置)
[ 问题: ] Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in th...
分类:其他好文   时间:2014-07-22 23:01:15    阅读次数:270
Ubuntu 12.04 安装WPS
1. 安装包下载:wps官网的 debian .deb 包 2 根据wifi说明,需要一下三个lib: libtiff.so.4 libpng12.so.0 libjpeg.so.62 通过以下命令查看是否具备: liaoqianwen@liaoqianwen-F80S:~ aptitude search libtiff 如果没有,安装: liao...
分类:其他好文   时间:2014-07-22 22:59:35    阅读次数:343
Ubuntu 下matlab 查看memory函数
function checkmemory%Copyright (c) 2014,Lv Qi%All rights reserved.%%Redistribution and use in source and binary forms, with or without modification, a...
分类:其他好文   时间:2014-05-10 20:07:52    阅读次数:413
Leetcode | Sum Root to Leaf Numbers
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which...
分类:其他好文   时间:2014-05-05 23:55:36    阅读次数:407
Validate Binary Search Tree
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:其他好文   时间:2014-05-02 15:03:57    阅读次数:386
leetcode: Search a 2D Matrix
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:其他好文   时间:2014-05-02 10:41:53    阅读次数:267
leetcode: Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:其他好文   时间:2014-05-02 09:54:11    阅读次数:269
Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:其他好文   时间:2014-05-02 07:05:08    阅读次数:311
LeetCode5:Longest Palindromic Substring
题目: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lo...
分类:其他好文   时间:2014-05-01 20:07:13    阅读次数:429
Unique Encryption Keys (思维题 预处理)
题目题意:给m个数字, q次询问, 询问b到e之间如果有重复数字就输出, 没有就输出OK思路:用f[i]数组 记录从i开始向后最近的有重复数字的 位置, 如 1 3 2 2, 则f[1] = 4;如果离a最近的重复数字的位置 都大于b, 就说明没有重复数字。f[]数组需要预处理,从后向前。 1 #i...
分类:其他好文   时间:2014-05-01 19:28:39    阅读次数:286
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!