自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 cc150 4.1

check if a tree is balancedpublic int getHeight (TreeNode root) {  if (root == null) return 0;  return Math.max(getHeight (root.left), getHeight(root.right)) + 1;}public boolean

2015-01-30 13:12:04 515

原创 Count and say

public class Solution {    public String countAndSay(int n) {        if (n             return null;        }        int num = 1;        String s = "1";                for (int i = 0; i

2014-10-16 11:27:31 319

原创 Subsets - leescode

Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.For exa

2014-10-15 08:51:41 281

转载 Subset

Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.For exa

2014-10-15 08:39:22 393

原创 Unique Path 2 - leetcode

Unique Paths II Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 

2014-10-15 05:49:53 325

原创 Flatten binary tree to linkedlist - leetcode

Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The fl

2014-10-15 04:27:51 335

原创 Valid parentheses - leetcode

Valid parentheses思路:code:publicclass Solution {    public boolean isValid(String s) {        if (s.length() == 0 || s.length() == 1) {            return false;        }

2014-10-14 04:49:46 261

原创 Valid parentheses

Valid Parentheses Total Accepted: 21159 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in t

2014-10-14 04:21:24 269

转载 wrap_content 和fill_parent

Android fill_parent、wrap_content和match_parent的区别(别处抄来zuo'b)三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精确地指定视图范围更加方便。1)fill_parent设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。这跟Wi

2014-08-10 04:32:21 519

空空如也

空空如也

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

TA关注的人

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