自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

达叔

天道酬勤

  • 博客(10)
  • 资源 (3)
  • 收藏
  • 关注

原创 【leetcode】将整数取反,-321返回-123(Reverse Integer)

题目描述如下:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321一目了然,知道了题目的意思了。。下面给出的我一开始的想法public int reverse(int num){ StringBuilder sb=new String

2013-12-28 23:04:40 2809 1

原创 【leetcode】在一堆每个数字都出现三次的数组中,找到那个只出现一次的数(Single Number II)

题目的描述是这样的:Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it wit

2013-12-28 19:38:32 5438

原创 【leetcode】非递归先序遍历二叉树(Binary Tree Preorder Traversal)

题目描述是这样的:Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: R

2013-12-25 11:31:53 2025

原创 【leetcode】比较两棵二叉树是否相同(Same Tree)

题目要求如下:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.

2013-12-23 22:46:54 2933

原创 【leetcode】数组中找出只出现一次的数字(Single Number)

题目是这样说的:Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it wit

2013-12-23 12:28:08 2180

原创 一段代码让你理解二叉树的递归奥秘

class TreeNode{ TreeNode left; TreeNode right; int val; TreeNode(int val){ this.val=val; } static void scanNodes(TreeNode root){ if(root!=null){ System.out.println("this is node :"+root

2013-12-23 10:21:12 4491 1

原创 【leetcode Java】二叉树的递归遍历以及最大深度的求解(Java)

递归是非常神奇的方法,代码看起来很简洁。对二叉树的遍历和求最大深度可以用递归的方法,主要思路就是遍历左子树,再遍历右子树。如果左子树上面的结点,有右孩子,则调用右子树的方法;遍历到左子树的叶节点的时候,返回,开始遍历右子树。如果右子树上面的结点有左孩子,则调用左子树的方法,遍历到右子树的叶子结点的时候,程序结束。static void scanNodes(TreeNode root){ i

2013-12-20 09:36:25 11230

转载 http头部解析

一、基础篇HTTP(HyperTextTransferProtocol) 是超文本传输协议的缩写,它用于传送WWW方式的数据,关于HTTP协议的详细内容请参考RFC2616。HTTP协议采用了请求/响应模型。客户端向服 务器发送一个请求,请求头包含请求的方法、URI、协议版本、以及包含请求修饰符、客户信息和内容的类似于MIME的消息结构。服务器以一个状态行作为响 应,相应的内容包括消息协议的版

2013-12-05 12:39:21 2682

翻译 提取表和子查询的区别(derived table vs subqueries)

子查询,大家再熟悉不过了,例如:select employee_namefrom employeewhere employee_salary >(select avg(employee_salary)from employee)下面这也是一个子查询,没用到where语句。INSERT INTO math_study_group(id, name)SELECT

2013-12-05 12:06:08 3125

原创 mysql如何删除重复记录

方法有很多,除了最简便的,alter ignore table 表名  add UNIQUE index(字段名);然后再将索引drop掉,这个方法外。更加中规中矩的方法也是有的。。比如我在网上搜到的:delete from people where peopleId  in (select  peopleId  from people  group  by  peop

2013-12-04 18:56:28 1448

学生电子账本系统

软件工程课设,采用swing+jdbc,后台采用mysql数据库,两张表,一张登陆表,一张账本表,大家可以轻松自己创建。

2013-04-27

android入门到精通

不可多得,通过代码学习,迅速上手。熟能生巧,android开发不在话下哦!

2013-03-23

空空如也

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

TA关注的人

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