码迷,mamicode.com
首页 >  
搜索关键字:search    ( 12380个结果
javascript---location.href/location.search/location.
javascript---location.href/location.search/location.
分类:编程语言   时间:2014-08-25 11:43:24    阅读次数:425
LeetCode Recover Binary Search Tree
class Solution {private: vector nodes;public: void recoverTree(TreeNode *root) { nodes.clear(); dfs(root); // 1 5 3 4 2 6 7...
分类:其他好文   时间:2014-08-25 01:07:23    阅读次数:329
11.5 排序后的字符串数组,其中散布着空字符串,编写一个方法,找出给定字符串的位置。
二分法变体,当查找到mid元素是空串时,同时向两边扩散寻找不为空串的索引作为mid,继续执行二分。public class Solution { public int search(String[] list, String str) { if (list == null || ...
分类:其他好文   时间:2014-08-24 14:09:32    阅读次数:149
算法学习笔记 二叉树和图遍历—深搜 DFS 与广搜 BFS
马上又要秋招了,赶紧复习下基础知识。这里复习下二叉树和图的深搜与广搜。从图的遍历说起,图的遍历方法有两种:深度优先遍历(Depth First Search), 广度优先遍历(Breadth First Search)。图搜索的经典应用走迷宫、N皇后、二叉树遍历等。遍历:定义按某种顺序访问“图”中所有的节点。...
分类:其他好文   时间:2014-08-24 12:58:32    阅读次数:8475
Search a 2D Matrix
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 fr...
分类:其他好文   时间:2014-08-24 11:37:02    阅读次数:194
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!