排序:
默认
按更新时间
按访问量

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

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

2014-04-26 16:24:55

阅读数:1091

评论数:0

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

阅读数:234

评论数:0

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 s...

2015-09-16 08:20:35

阅读数:247

评论数:0

Divide Two Integers

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

2015-09-16 08:20:03

阅读数:179

评论数:0

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 fon...

2015-09-16 08:19:41

阅读数:163

评论数:0

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 fol...

2015-09-16 08:19:14

阅读数:306

评论数:0

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: [ ...

2015-09-16 08:18:41

阅读数:177

评论数:0

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...

2015-09-16 08:17:58

阅读数:160

评论数:0

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...

2015-09-15 09:25:50

阅读数:154

评论数:0

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 concate...

2015-09-15 09:25:28

阅读数:141

评论数:0

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-n...

2015-09-15 09:25:05

阅读数:116

评论数:0

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 = ”ADO...

2015-09-15 09:24:43

阅读数:138

评论数:0

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

阅读数:161

评论数:0

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 init...

2015-09-15 09:23:56

阅读数:153

评论数:0

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...

2015-09-15 09:23:38

阅读数:183

评论数:0

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 quest...

2015-09-15 09:23:16

阅读数:152

评论数:0

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 labe...

2015-09-15 09:22:54

阅读数:193

评论数:0

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 suc...

2015-09-15 09:21:51

阅读数:194

评论数:0

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. F...

2015-09-15 09:21:31

阅读数:175

评论数:0

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 fro...

2015-09-15 09:21:10

阅读数:171

评论数:0

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