会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
lilyfindjob
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
2014年10月28日
leetcode Minimum Depth of Binary Tree
摘要: 1,关于递归还是要有时间就练习,又有些生疏了/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeN...
阅读全文
posted @ 2014-10-28 05:18 lilyfindjob
阅读(82)
评论(0)
推荐(0)
2014年10月27日
leetcode Remove Element
摘要: 挺简单的,没什么好说的public class Solution { public int removeElement(int[] A, int elem) { int j=0; for(int i=0;i<A.length;i++){ if(...
阅读全文
posted @ 2014-10-27 12:13 lilyfindjob
阅读(79)
评论(0)
推荐(0)
leetcode Longest Common Prefix
摘要: 1, 思考过程比较慢,加强锻炼2,空字符串的定义,不能用null3,数组的长度为array.length,而string的长度为函数 string.length()public class Solution { public String longestCommonPrefix(String[...
阅读全文
posted @ 2014-10-27 11:51 lilyfindjob
阅读(92)
评论(0)
推荐(0)
2014年10月26日
leetcode Merge Sorted Array
摘要: 做这道题的时候思路不是很清晰。写的乱七八糟!!挺简单的一道题,向别人写的学习!!package Leetcode;public class MergeSortedArray { public static void merge(int A[], int m, int B[], int n) {...
阅读全文
posted @ 2014-10-26 11:46 lilyfindjob
阅读(99)
评论(0)
推荐(0)
leetcode palindrome number
摘要: 1,采用reverse的方法,来比较是不是palindrome2,reverse number的方法!!3,还要记得负数的情况package Leetcode;public class PalindromeNumber {public boolean isPalindrome(int x) { ...
阅读全文
posted @ 2014-10-26 07:34 lilyfindjob
阅读(82)
评论(0)
推荐(0)
2014年10月25日
leetcode string to integer
摘要: 1, string.trim()将string中的空格去掉。2,java 中有定义int的最大值和最小值,Integer.MAX_VALUE Integer.MIN_VALUE3,将char的值转换为integer的值, 就-‘0’public class stringtoint { publ...
阅读全文
posted @ 2014-10-25 07:41 lilyfindjob
阅读(125)
评论(0)
推荐(0)
上一页
1
2
3
4
5
公告