做完Find Minimum in Rotated Sorted Array I觉得很简单,再做2发现也不难,但是LeetCode竟然给了一个hard评级,难道是我编程水平大有长进?哈哈我估计是对复杂度有很高的要求的情况下比较难吧。。
Python(偷懒)做法就是一句话:return min(num)
Java(基本做法)如下:
public class Solution {
pub...
分类:
其他好文 时间:
2015-03-03 11:44:26
阅读次数:
128
1.自定义RadioButton的setMinimumWidth无效查文档,无法保证一定设置成功,可能受父Layout的影响而无法生效。而我的布局正是自定义的FlowLayoutSets the minimum width of the view. It is not guaranteed the ...
分类:
移动开发 时间:
2015-03-03 11:19:00
阅读次数:
231
题目Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.For example, given s = “aab”,
Return 1 sinc...
分类:
其他好文 时间:
2015-03-02 23:58:14
阅读次数:
368
目录目录
题目
思路1
AC代码
缺陷
思路2
AC代码题目
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
push(x) – Push element x onto stack.
pop() – Removes the ele...
分类:
其他好文 时间:
2015-03-02 13:08:54
阅读次数:
141
题目Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on a word:a)...
分类:
其他好文 时间:
2015-03-01 13:18:01
阅读次数:
124
A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as po...
分类:
其他好文 时间:
2015-03-01 08:52:30
阅读次数:
186
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get ...
分类:
其他好文 时间:
2015-02-28 18:45:25
阅读次数:
116
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:
其他好文 时间:
2015-02-26 18:10:39
阅读次数:
137
Problem Description
Now, here is a fuction:
F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0
Can you find the minimum value when x is between 0 and 100.
Input
The first line of the input contains an in...
分类:
其他好文 时间:
2015-02-25 14:17:22
阅读次数:
220
https://oj.leetcode.com/problems/minimum-depth-of-binary-tree/Given a binary tree, find its minimum depth.The minimum depth is the number of nodes alo...
分类:
其他好文 时间:
2015-02-24 16:20:19
阅读次数:
141