自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Yuwen's Hero

为天地立心,为生民立命,为往圣继绝学,为万世开太平

  • 博客(6)
  • 资源 (1)
  • 收藏
  • 关注

原创 Sort Colors

Question: 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

2012-12-27 10:55:56 3611

原创 Spiral Matrix

Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n = 3, You should return the following matrix: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [

2012-12-21 00:57:33 1803

原创 Search for a Range

Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in t

2012-12-21 00:55:35 1814

原创 Minimum Path Sum

Question: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either dow

2012-12-21 00:54:20 1959

原创 Decode Ways

A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine the total numb

2012-12-21 00:53:20 1870

原创 Closest node to the target in BST

Question: Give a BST, find a node whose value is closest to the target. public static int closestValue(Node root, int value, int maxDiff) { if (root == null) return Integer.MAX_VALUE; int tempDiff

2012-12-21 00:50:43 2121

算法设计与分析 王晓东

算法设计与分析 作者:王晓东 清华大学出版社出版

2010-04-10

空空如也

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

TA关注的人

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