自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(256)
  • 资源 (14)
  • 收藏
  • 关注

原创 类与类之间的关系之UML类图识别

关联关系关联关系(Association)是类与类之间最常用的一种关系,它是一种结构化关系,用于表示一类对象与另一类对象之间有联系。 在UML类图中,用实线连接有关联的对象所对应的类,在使用Java、C#和C++等编程语言实现关联关系时,通常将一个类的对象作为另一个类的属性。 在使用类图表示关联关系时可以在关联线上标注角色名。

2014-04-26 16:24:55 2538

原创 Max Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.

2015-09-16 08:20:59 347

原创 Text Justification

Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You should pack your words in a greedy approach; that is,

2015-09-16 08:20:35 381

原创 Divide Two Integers

Divide two integers without using multiplication, division and mod operator.

2015-09-16 08:20:03 328

原创 ZigZag Conversion

The string ”PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y

2015-09-16 08:19:41 253

原创 Spiral Matrix II

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 ], [ 7,

2015-09-16 08:19:14 388

原创 Spiral Matrix

Given a matrix of m×n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, Given the following matrix: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ] You shou

2015-09-16 08:18:41 249

原创 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?

2015-09-16 08:17:58 236

原创 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] ]

2015-09-15 09:25:50 234

原创 Substring with Concatenation of All Words

You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an

2015-09-15 09:25:28 216

原创 Multiply Strings

Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-negative.

2015-09-15 09:25:05 220

原创 Minimum Window Substring

Given a string S and a string T , find the minimum window in S which will contain all the characters in T in complexity O(n). For example, S = ”ADOBECODEBANC”, T = ”ABC” Minimum window is ”BANC”. N

2015-09-15 09:24:43 217

原创 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]

2015-09-15 09:24:20 236

原创 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. Exampl

2015-09-15 09:23:56 261

原创 Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note

2015-09-15 09:23:38 252

原创 Reverse Integer

Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus points for you if y

2015-09-15 09:23:16 218

原创 Clone Graph

Clone an undirected graph. Each node in the graph contains a label and a list of its neighbours. OJ’s undirected graph serialization: Nodes are labeled uniquely. We use # as a separator for each node

2015-09-15 09:22:54 286

原创 Word Break II

Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences. For example, given s = “cats

2015-09-15 09:21:51 289

原创 Word Break

Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s = “leetcode”, dict = [“leet”,

2015-09-15 09:21:31 245

原创 Distinct Subsequences

Given a string S and a string T , count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from the original string by deleting some (can be none

2015-09-15 09:21:10 249

原创 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 number

2015-09-15 09:20:37 262

原创 Edit Distance

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on a word:

2015-09-15 09:20:03 364

原创 Minimum Path Sum

Given a m × 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 down or right at a

2015-09-15 09:19:29 214

原创 Scramble String

Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation of s1 = “great”: great / \ gr eat

2015-09-15 09:18:52 340

原创 Interleaving String

Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example, Given: s1 = ”aabcc”, s2 = ”dbbca”, When s3 = ”aadbbcbcac”, return true. When s3 = ”aadbbbaccc”, return fals

2015-09-15 09:14:27 267

原创 Best Time to Buy and Sell Stock III

Say you have an array for which the i-th element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most two transactions. Note: You may not e

2015-09-15 09:07:18 209

原创 Maximal Rectangle

Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones and return its area.

2015-09-15 09:06:57 195

原创 Palindrome Partitioning II

Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s. For example, given s = ”aab”, Return 1 si

2015-09-15 09:06:34 201

原创 Maximum Subarray

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 subarray [4,−1,2,1] has t

2015-09-14 08:44:38 200

原创 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], [6,5,7], [4,1

2015-09-14 08:44:19 196

原创 Container With Most Water

Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i,0). Find two line

2015-09-14 08:43:56 201

原创 Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for ”abcabcbb” is ”abc”, which the length is 3. For

2015-09-14 08:43:35 203

原创 Best Time to Buy and Sell Stock II

Say you have an array for which the i-th element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one

2015-09-14 08:43:10 199

原创 Best Time to Buy and Sell Stock

Say you have an array for which the i-th element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock),

2015-09-14 08:42:48 198

原创 Jump Game II

Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Your goal is to

2015-09-14 08:42:27 189

原创 Jump Game

Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you

2015-09-14 08:42:01 219

原创 Sqrt(x)

Implement int sqrt(int x). Compute and return the square root of x.

2015-09-14 08:40:55 192

原创 Pow(x,n)

Implement pow(x, n).

2015-09-14 08:40:35 191

原创 Word Search

Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are those horizontally or vertically n

2015-09-14 08:40:07 217

原创 Sudoku Solver

Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character ‘.’. You may assume that there will be only one unique solution.

2015-09-14 08:39:45 174

CUnit-2.1-2-src.tar

CUnit-2.1-2-src.tar源码单元测试

2015-04-17

VC++.Net技术内幕

VC++.Net技术内幕,翻页方便,倾情奉献,下载分数乃身外之物,知识才是无价的。

2014-06-18

More Effective C++

More Effective C++,翻页方便,倾情奉献,下载分数乃身外之物,知识才是无价的。

2014-06-18

effectiveC++

effectiveC++,中文版,翻页方便,倾情奉献,下载分数乃身外之物,知识才是无价的。

2014-06-18

MySQL安装教程

MySQL 安装

2014-06-01

算法导论第二版(中文,高清)+经典答案

算法导论第二版(中文,高清)+经典答案,本人收藏多年!特此共享给大家!

2014-06-01

Photoshop技巧

Photoshop技巧

2014-05-29

5分钟教会五笔

5分钟教会五笔

2014-05-29

6级作文万能模板

6级作文万能模板,6级作文万能模板,6级作文万能模板,6级作文万能模板

2014-05-29

数据结构1800题包括完整答案

数据结构1800题包括完整答案

2014-05-29

cocos2d-x3.0物理引擎源码

由于物理引擎的使用发生了很大的变化,这是我在cocos2d-x 3.1 引擎下,最新调试出,可以用的物理引擎。大家可以尝试下。由于耗费了很多时间才调试好。积分多点见谅。

2014-05-29

空空如也

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

TA关注的人

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