自定义博客皮肤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)
  • 资源 (33)
  • 问答 (1)
  • 收藏
  • 关注

原创 二叉树前序、中序、后序遍历(Java递归版)

Binary Tree Preorder Traversalpublic class Solution { public List preorderTraversal(TreeNode root) { List result = new ArrayList(); helper(root, result); return result;

2016-09-30 18:42:25 698

原创 String to Integer (atoi)

题目描述Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possibl

2016-09-29 21:28:31 480

转载 栈的压入、弹出序列

http://www.nowcoder.com/questionTerminal/d77d11405cc7470d82554cb392585106栈的压入、弹出序列题目描述输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否为该栈的弹出顺序。假设压入栈的所有数字均不相等。例如序列1,2,3,4,5是某栈的压入顺序,序列4,5

2016-09-14 19:40:06 532

转载 把数组排成最小的数

把数组排成最小的数http://www.nowcoder.com/questionTerminal/8fecd3f8ba334add803bf2a06af1b993题目描述输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个。例如输入数组{3,32,321},则打印出这三个数字能排成的最小数字为321323。

2016-09-14 13:25:04 433

原创 把二叉树打印成多行 按之字形顺序打印二叉树 binary tree zigzag level order traversal

把二叉树打印成多行题目描述从上到下按层打印二叉树,同一层结点从左至右输出。每一层输出一行。import java.util.*;/*public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public Tree

2016-09-12 21:02:45 968

原创 从尾到头打印链表 反转链表

从尾到头打印链表题目描述输入一个链表,从尾到头打印链表每个节点的值。 输入描述:输入为链表的表头输出描述:输出为需要打印的“新链表”的表头/***    public class ListNode {*        int val;*        ListNode next = null;**

2016-09-12 13:47:32 531

原创 华为OJ-质数因子-C++实现/Java实现

质数因子题目描述功能:输入一个正整数,按照从小到大的顺序输出它的所有质数的因子(如180的质数因子为2 2 3 3 5 )最后一个数后面也要有空格详细描述:函数接口说明:public String getResult(long ulDataInput)输入参数:long ulDataInput:输入的正整数返回值:String输入描述:输入一个long型整数输出描述:按照从小到大的顺序输出它的所有...

2016-09-11 13:42:58 929

原创 3Sum

3sum温赵菊苣做过的题题目描述Given an array S of n integers, are there elements a, b, c in S such that a + b + c= 0? Find all unique triplets in the array which gives the sum of zero.

2016-09-11 12:08:33 358

原创 最大差值 贪心

最大差值题目描述有一个长为n的数组A,求满足0≤a≤b给定数组A及它的大小n,请返回最大差值。测试样例:[10,5],2返回:0import java.util.*;public class LongestDistance { public int getDis(int[] A, int n) { //

2016-09-11 11:22:28 1026

原创 LeetCode:152. Maximum Product Subarray Java 子数组最大乘积

152. Maximum Product SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contigu

2016-09-05 13:52:56 1250

原创 LeetCode:234. Palindrome Linked List 回文链表 Java

Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?Subscribe to see which companies asked this question回文链表

2016-09-04 13:25:18 930 1

原创 maximum-subarray Java 贪心

题目描述Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[−2,1,−3,4,−1,2,1,−5,4],the contiguous subarra

2016-09-03 14:27:38 995

原创 最长公共子串 最长公共子序列

经典动态规划问题最长公共子串(要求连续)最长公共子串题目描述对于两个字符串,请设计一个时间复杂度为O(m*n)的算法(这里的m和n为两串的长度),求出两串的最长公共子串的长度。这里的最长公共子串的定义为两个序列U1,U2,..Un和V1,V2,...Vn,其中Ui + 1 == Ui+1,Vi + 1 == Vi+1,同时Ui == Vi

2016-09-03 13:40:21 1886

Volley jar包

Volley jar包

2016-10-28

Gson的使用

Gson的使用

2016-10-28

Gson jar包

Gson jar包

2016-10-28

仿QQ侧滑栏

仿QQ侧滑栏

2016-08-17

抽屉式菜单

抽屉式菜单

2016-08-17

普通侧滑菜单

普通侧滑菜单

2016-08-17

JSON解析 创建JSON

JSON解析 创建JSON

2016-07-22

DOM解析XML 创建XML

DOM解析XML 创建XML

2016-07-22

自定义ImageView及竖向文字

自定义ImageView及竖向文字

2016-07-19

SharedPreferences

SharedPreferences

2016-07-19

Android文件存储

Android文件存储

2016-07-19

ContentProvider读取系统联系人

ContentProvider读取系统联系人

2016-07-18

自定义View

Android 自定义View (一)

2016-07-17

FrameAnimation

FrameAnimation

2016-07-17

基础总结篇之五:BroadcastReceiver应用详解

基础总结篇之五:BroadcastReceiver应用详解

2016-07-16

Activity与远程Service通信,使用AIDL

Activity与远程Service通信,使用AIDL

2016-07-14

Service及Notificaition

Android Service完全解析,关于服务你所需知道的一切(上)

2016-07-13

XSSF创建Excel高版本

XSSF创建Excel高版本

2017-08-27

Excel解析工具POI.jar

Excel解析工具POI.jar

2017-08-27

jxl.jar包 用于Excel导入导出

jxl.jar包 用于Excel导入导出

2017-08-27

初始Struts2

Struts2入门

2017-07-27

Servlet+Ajax实现简易的仿百度搜索框智能提示

Servlet+Ajax实现简易的仿百度搜索框智能提示

2017-07-26

SpringBoot数据库增删改查 事务管理

SpringBoot数据库增删改查 事务管理

2017-06-18

MyBatis(四)

MyBatis(四) 删除单条数据

2017-06-11

MyBatis(三)

MyBatis(三) OGNL log4j

2017-06-10

MyBatis(二)

MyBatis(二) MicroMessage2.rar

2017-06-10

MyBatis(一)

博客MyBatis(一)源码

2017-06-10

简单工厂模式

工厂模式

2017-05-27

arity jar包

计算器引擎 arity jar包

2016-11-15

SQLiteDemo

SQLiteDemo

2016-11-12

RecyclerView jar包

RecyclerView jar包

2016-11-02

属性动画Demo

郭霖属性动画博文源码

2016-10-31

简单画板实现

自定义View继承SurfaceView实现画板

2016-10-24

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

TA关注的人

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