自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (5)
  • 收藏
  • 关注

原创 LeetCode 61 Unique Paths

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the

2014-07-08 18:43:15 547

原创 LeetCode 35 Valid Sudoku

Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character '.'.A partially fille

2014-07-07 13:38:45 957

原创 程序模拟洗扑克牌(算法)

洗扑克牌的四种算法,这四种算法是我随着时间的积累而想出来的一个比一个更好。

2014-07-04 23:45:03 1960

原创 LeetCode 110 Balanced Binary Tree

Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe

2014-07-03 22:36:53 544

原创 LeetCode 106 Construct Binary Tree from Inorder and Postorder Traversal

Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.silu

2014-07-03 19:11:50 789

原创 LeetCode 105 Construct Binary Tree from Preorder and Inorder Traversal

Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.思路:digui

2014-07-03 19:10:03 471

原创 LeetCode 147 Insertion Sort List

Sort a linked list using insertion sort.

2014-07-03 16:01:01 483

原创 LeetCode 74 Search a 2D Matrix

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to right.The first integer of each

2014-07-03 12:35:55 669

原创 LeetCode 75 Sort Colors

Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the integers

2014-07-02 23:20:38 691

原创 LeetCode 56 Insert Interval

Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their start times.E

2014-07-02 20:53:38 549

原创 LeetCode 55 Merge Intervals

Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].

2014-07-02 20:40:36 404

原创 LeetCode 91 Subsets II

Given a collection of integers that might contain duplicates, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplica

2014-07-02 18:46:22 451

原创 LeetCode 81 Search in Rotated Sorted Array II

Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a function to determine if a given target is in the

2014-07-02 18:42:37 511

原创 LeetCode 32 Search in Rotated Sorted Array

Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array retur

2014-07-02 18:40:13 395

原创 LeetCode 78 Subsets

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 example,

2014-07-02 01:12:29 435

原创 java 数组常见的几种排序

1. 数字排序 int[] intArray = new int[] { 4, 1, 3, -23 };  Arrays.sort(intArray);  输出: [-23, 1, 3, 4]2. 字符串排序,先大写后小写 String[] strArray = new String[] { "z", "a", "C" };  Arrays.sort(strArra

2014-07-02 01:05:08 554

原创 LeetCode 31 Longest Valid Parentheses

Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses substring is "()",

2014-07-01 16:41:44 378

原创 LeetCode 119 Pascal's Triangle II

Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extra space?

2014-07-01 11:46:20 476

原创 LeetCode 118 Pascal's Triangle

Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]

2014-07-01 11:44:29 385

原创 LeetCode 120 Triangle

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3,4], [

2014-07-01 09:57:27 464

c语言中常见的错误

这是c语言中常见的错误,由编译器所提供以及自我分析

2013-04-19

C++库函数电子书

这本电子书是c++库函数,对我们c++变成十分有用,值得你下载!

2013-04-19

电子科大java实验

该实验的代码由本人亲写,代码无任何问题,其中有代码还有优化

2011-05-18

数据结构主要算法动画演示

这是我们在学习数据结构时所常用的算法,对以后的编程,有用。所采用的是swf格式,请用flash打开。

2010-06-02

空空如也

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

TA关注的人

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