码迷,mamicode.com
首页 >  
搜索关键字:empty    ( 6963个结果
Leetcode#122 Best Time to Buy and Sell Stock II
原题地址如果不限交易次数,把所有递增序列差值求和即可。代码: 1 int maxProfit(vector &prices) { 2 if (prices.empty()) 3 return 0; 4 5 int profi...
分类:其他好文   时间:2015-01-30 16:54:46    阅读次数:129
[leetcode] 44 Wildcard Matching
问题描述; Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching shou...
分类:其他好文   时间:2015-01-29 22:34:30    阅读次数:130
LeetCode—Compare Version Numbers
Compare two version numbers version1 and version1. If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0. You may assume that the version strings are non-empty and co...
分类:其他好文   时间:2015-01-29 19:36:35    阅读次数:168
jquery操作html元素之(删除元素)
删除元素/内容如需删除元素和内容,一般可使用以下两个 jQuery 方法:remove() - 删除被选元素(及其子元素)empty() - 从被选元素中删除子元素jQuery remove() 方法jQuery remove() 方法删除被选元素及其子元素。实例$("#div1").remove(...
分类:Web程序   时间:2015-01-29 19:21:08    阅读次数:163
uva 11520 Fill the Square(枚举)
uva 11520 Fill the Square In this problem, you have to draw a square using uppercase English Alphabets. To be more precise, you will be given a square grid with some empty blocks and other...
分类:其他好文   时间:2015-01-29 17:49:36    阅读次数:152
LeetCode—Majority Element
Given an array of size n, find the majority element. The majority element is the element that appears more than ? n/2 ? times. You may assume that the array is non-empty and the majority element ...
分类:其他好文   时间:2015-01-29 16:05:16    阅读次数:164
leetcode 36: Valid Sudoku
Total Accepted: 24574 Total Submissions: 90344 Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells ...
分类:其他好文   时间:2015-01-29 14:44:06    阅读次数:182
Leetcode#91 Decode Ways
原题地址动态规划题,注意0导致的小陷阱。代码: 1 int numDecodings(string s) { 2 if (s.empty() || s[0] '9') return 0; 3 4 int sum = s[s.length() - 1...
分类:其他好文   时间:2015-01-29 14:00:55    阅读次数:150
UVA FILL(BFS + 优先队列)
Problem D FILL   There are three jugs with a volume of a, b and c liters. (a, b, and c are positive integers not greater than 200). The first and the second jug are initially empty, while the...
分类:其他好文   时间:2015-01-28 09:46:17    阅读次数:275
Struts 1 之<logic>标签库
1. logic:empty logic:empty标签是用来判断是否为空的。如果为空,该标签体中嵌入的内容就会被处理。该标签用于以下情况: 当Java对象为null时 当String对象为""时 当java.util.Collection对象中的isEmpty()返回true时 当java.util.Map对象中的isEmpty()返回true时 下面的代码示例了logic...
分类:其他好文   时间:2015-01-28 09:43:05    阅读次数:183
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!