码迷,mamicode.com
首页 >  
搜索关键字:find    ( 24186个结果
【Kth Smallest Element in a BST 】cpp
题目:Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST's t...
分类:其他好文   时间:2015-07-14 15:13:55    阅读次数:98
Majority Element
题目:Given an array of sizen, find the majority element. The majority element is the element that appears more than? n/2 ?times.You may assume that the ...
分类:其他好文   时间:2015-07-14 15:04:53    阅读次数:118
HDU4639:Hehe
Problem Description As we all know, Fat Brother likes MeiZi every much, he always find some topic to talk with her. But as Fat Brother is so low profile that no one knows he is a rich-two-generatio...
分类:其他好文   时间:2015-07-14 13:38:51    阅读次数:150
【Lowest Common Ancestor of a Binary Search Tree】cpp
题目: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 Wikipedi...
分类:其他好文   时间:2015-07-14 13:23:34    阅读次数:107
[LeetCode] Longest Substring with At Most Two Distinct Characters
Problem DescriptionGiven a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s =“eceba...
分类:其他好文   时间:2015-07-14 13:20:40    阅读次数:95
OS X 10.11 安装Cocoapods 出现问题的解决方法
今天尝试用 Cocoapods安装个第三方库.. 输入pod install, 发现 command not find。 WTF! 估计是升级10.11后Cocoapods被干掉了。 我输入 sudo gem install cocoa pods 之后,出现如下问题: ERROR:  While executing gem ... (Gem::DependencyEr...
分类:其他好文   时间:2015-07-14 11:48:21    阅读次数:467
linux 批量清除tomcat日志
直接删除文件find /tomcat/logs/ -name '*.log.*' | xargs rm -f2,将文件内容清零find /tomcat/logs/ -name 'catalina.out' | xargs truncate -s...
分类:系统相关   时间:2015-07-14 11:22:13    阅读次数:168
[LeetCode]235.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 the definition of LCA on Wikipedia: “The lowest common ancestor is defined between t...
分类:其他好文   时间:2015-07-14 10:09:09    阅读次数:219
5.Longest Palindromic Substring (String; DP)
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 longes...
分类:其他好文   时间:2015-07-14 09:48:50    阅读次数:130
Majority Element
Question:Given an array of sizen, find the majority element. The majority element is the element that appears more than? n/2 ?times.You may assume tha...
分类:其他好文   时间:2015-07-14 07:32:48    阅读次数:101
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!