自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

刷刷刷

处处留心,处处化为心计之学问

  • 博客(7)
  • 收藏
  • 关注

原创 10Regular Expression Matching

Implement regular expression matching with support for '.' and '*'.'.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire input stri

2016-06-25 16:53:48 254

原创 17. Letter Combinations of a Phone Number

public List letterCombinations(String digits) { //递归 枚举 List result = new ArrayList(); if("".equals(digits)||digits.length()==0) return result; Stri

2016-06-25 16:32:47 221

原创 22. Generate Parentheses

public List generateParenthesis(int n) { ArrayList result = new ArrayList(); dfs(result, "", n, n); return result; } public void dfs(ArrayList result, String s, int left, int right){//其中l

2016-06-25 16:26:26 213

原创 Valid Parentheses 合法括号

public boolean isValid(String s) { Stack stack = new Stack(); int i =0; char []temp = s.toCharArray(); while(i<temp.length) { if(stack.isEmpty()) { if(temp[i]=='('||temp[

2016-06-25 16:22:26 221

原创 1Roman to Integer 2 Integer to Roman 3 Integer to English Words转化问题

罗马数字七个对应的: case 'I': return 1; case 'V': return 5; case 'X': return 10; case 'L': return 50; case 'C': return 100;

2016-06-25 16:15:02 236

原创 8. String to Integer (atoi)

//重点是考虑全边界值 public int myAtoi(String str) { if (str == null || str.length() < 1) return 0; // 去掉空格 str = str.trim(); char flag = '+'; //确定正负 int i = 0; if (str.charAt(0) ==

2016-06-25 15:54:53 245

原创 3. Longest Substring Without Repeating Characters

思路:是要找到无重复字母的最大子串  循环遍历时间复杂度太高  可以定义一个辅助数组; public int lengthOfLongestSubstring(String s) { int res = 0;//结果 int left = 0;//维持一个left指针 指向没有重复字母的子

2016-06-25 15:49:49 208

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除