自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Multiply Strings Input: "9", "9" Output: "1" Expected: "81"

Multiply StringsInput:"9", "9"Output:"1"Expected:"81"public class Solution { public String multiply(String num1, String num2) {

2015-02-07 10:07:58 219

原创 Multiply Strings Total 溢出解法

Multiply Strings My SubmissionsQuestion Solution public class Solution { public String multiply(String num1, String num2) { Solution solu = new Solution(); int

2015-02-07 05:17:37 255

原创 Symmetric Tree TotalA

Symmetric Tree Total code/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } *

2015-01-31 01:27:09 293

原创 Symmetric Tree -1.30 没有通过

Symmetric Tree code:/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public

2015-01-31 01:09:44 394

原创 171 Excel Sheet Column Number

171Excel Sheet Column Number我的代码:public class Solution { public int titleToNumber(String s) { int i = 0; int sum = 0; while(i < s.length()) { sum *= 26;

2015-01-30 23:30:52 255

原创 Excel Sheet Column Title

Excel Sheet Column Title我的代码:public class Solution { public String convertToTitle(int n) { StringBuilder sb = new StringBuilder(); int k; char c; while(n >0) {

2015-01-30 09:56:20 175

原创 88 Merge Sorted Array

Merge Sorted Array 我的代码public class Solution { public void merge(int A[], int m, int B[], int n) { int k = m-1; int j = n-1; while(k != -1 && j != -1) {

2015-01-30 08:47:22 183

原创 Valid Parentheses

Valid Parentheses  我的代码:public class Solution { public boolean isValid(String s) { Stack st = new Stack(); if (s.length() == 0) { return true; } f

2015-01-30 03:06:53 186

原创 Binary Tree Level Order Traversal

Binary Tree Level Order Traversal -- leetcode我的代码:/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNod

2015-01-28 00:07:56 185

原创 Balanced Binary Tree

Balanced Binary Tree 我的代码(递归实现height()和isBalanced()):/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode ri

2015-01-26 11:22:46 219

原创 Minimum Depth of Binary Tree 非递归实现

Minimum Depth of Binary Tree 非递归实现我的代码:/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val =

2015-01-26 09:30:03 318

原创 二叉树先序遍历非递归实现

-1.24自己没写出来,贴一段别人的代码public void preOrderNonRecursive(BinaryTreeNode current){ Stack stack = new Stack(); while((current!=null)||(stack.isEmpty())){ if(current!=null){

2015-01-25 03:39:45 343

原创 Minimum Depth of Binary Tree leetcode

Minimum Depth of Binary Tree leetcode我的代码:/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x

2015-01-24 03:12:15 202

空空如也

空空如也

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

TA关注的人

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