码迷,mamicode.com
首页 >  
搜索关键字:find    ( 24186个结果
1068. Find More Coins (30)
题目如下: Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payment...
分类:其他好文   时间:2015-08-03 14:32:21    阅读次数:262
查找目录下的所有文件中是否含有某个字符串
查找目录下的所有文件中是否含有某个字符串find .|xargs grep -ri "IBM"查找目录下的所有文件中是否含有某个字符串,并且只打印出文件名find .|xargs grep -ri "IBM" -l1.正则表达式(1)正则表达式一般用来描述文本模式的特殊用法,由普通字符(例如字符a-...
分类:其他好文   时间:2015-08-03 14:14:42    阅读次数:112
Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to thedefinition of LCA on Wikipedia: ...
分类:其他好文   时间:2015-08-03 10:06:50    阅读次数:119
【LeetCode-面试算法经典-Java实现】【079-Word Search(单词搜索)】
【079-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,...
分类:编程语言   时间:2015-08-03 07:49:37    阅读次数:131
Find Lines
(Uva 6955可以直接随机,湖大OJ 13348 要优化) 题意:给出 n个点的坐标, 一个 百分数p, 求是否有一条直线上有 n * p /100个点… 随机化算法,但也要优化下……(TLE, WA到底…) #include #include #include #include #includ...
分类:其他好文   时间:2015-08-03 07:49:37    阅读次数:131
Lowest Common Ancestor****
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to thedefinition of LCA on Wikipedia: “The lowest ...
分类:其他好文   时间:2015-08-03 01:10:46    阅读次数:121
Binary Tree Maximum Path Sum
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:其他好文   时间:2015-08-02 23:11:15    阅读次数:128
UVa 11987 并查集 Almost Union-Find
原文戳这与以往的并查集不同,这次需要一个删除操作。如果是叶子节点还好,直接修改父亲指针就好。但是如果要是移动根节点,指向它的所有子节点也会跟着变化。所以要增加一个永远不会被修改的虚拟根节点,这样就可以把一个点从集合中删除而不影响其它的点了。 1 #include 2 #include 3 #in.....
分类:其他好文   时间:2015-08-02 23:08:08    阅读次数:194
SRM 664 Div2 Hard: BearSortsDiv2(归并排序)
Problem Statement   Bear Limak was chilling in the forest when he suddenly found a computer program. The program was a correct implementation of MergeSort. Below you can find the program in ...
分类:编程语言   时间:2015-08-02 21:45:31    阅读次数:181
python find命令、startwith命令
python的字符串有很多好用的操作,比如find,startswith命令。这几个命令在处理配置文件的时候很有用,比如用startswith判断是否是注释行。注意:几个函数的返回值是不同滴。函数原型:find(str,pos_start,pos_end),返回-1或第一个查找到的位置。 ...
分类:编程语言   时间:2015-08-02 21:34:28    阅读次数:160
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!