- 博客(9)
- 收藏
- 关注
原创 150. Evaluate Reverse Polish Notation
题目: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another expression. Some examples: ["2", "1", "+", "
2016-06-08 10:58:23 249
原创 84. Largest Rectangle in Histogram
题目: Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. Above is a histogram where width of ea
2016-06-07 22:19:18 213
原创 32. Longest Valid Parentheses
题目: Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.For “(()”, the longest valid parentheses substring is “()”, whic
2016-06-07 20:28:27 155
原创 20. Valid Parentheses
Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}” are all valid but “
2016-06-03 20:38:34 185
原创 58. Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defined as
2016-06-03 18:33:47 210
原创 71. Simplify Path
Given an absolute path for a file (Unix-style), simplify it.For example, path = “/home/”, => “/home” path = “/a/./b/../../c/”, => “/c”Corner Cases: Did you consider the case where path = “/../”? In
2016-06-03 17:04:09 227
原创 Valid Anagram (java)
题目: Given two strings s and t, write a function to determine if t is an anagram of s.For example, s = “anagram”, t = “nagaram”, return true. s = “rat”, t = “car”, return false.Note: You may assume
2016-06-02 20:03:30 367
原创 Count and Say (java)
题目: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, …1 is read off as “one 1” or 11. 11 is read off as “two 1s” or 21. 21 is read off as “one 2
2016-06-02 15:44:02 200
原创 C++ 引用
C++中,引用其实是变量的别名,引用可以分为以下几种:(1)基本数据类型的引用:int a=0; int &b =a; b=10; cout<<"a="<<a<<endl;则打印结果:a=10; 引用必须要初始化,而且对引用变量进行操作,所达到的效果和对变量进行操作时一样的。 (2)结构体类型的引用://定义一个结构体类型 typedef struct{ int x; in
2016-06-02 15:03:14 242
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人