自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(86)
  • 收藏
  • 关注

原创 系统分析与设计 第九次作业

使用 ECB 实现 make reservation 用例的详细设计(包含用例简介,顺序图,类图)将逻辑设计类图映射到实际项目框架的包图。用树形结构表述实现的包和类Make Reservation 用例详细设计用例简介Make Reservation是用户使用酒店预订系统预定酒店的一个环节,根据Asg_RH文档,Make Reservation的过程主要分为四步: ...

2018-06-30 21:39:48 390

原创 系统分析与设计 第八次作业

个人作业:描述软件架构与框架之间的区别与联系以你的项目为案例 绘制三层架构模型图,细致到分区结合你程序的结构,从程序员角度说明三层架构给开发者带来的便利研究 VUE 与 Flux 状态管理的异同1.软件架构与框架之间的区别与联系: 区别:软件架构把系统分解为一些部件,描述这些部件的职责及它们之间的协作行为,和语言无关。架构模式提供了特定领域常见问题的解决方案,如信息系统领域、...

2018-06-06 23:03:40 323

原创 系统分析与设计 建模练习

练习文档编写 选择一个你喜欢的 移动App 或 其中某业务参考 Asg_RH 文档格式 编写软件描述文档要包含一个业务的完整过程建模要求包括(用例图、XX业务或用例的活动图、XX领域模型、XX对象的状态图、XX场景的系统顺序图与操作协议)奇妙清单 软件描述文档本文档的问题域是一款名叫“奇妙清单”的事项管理类移动应用,通过它可以管理个人事项,并进行任务共享。下文给出该应用的几个截...

2018-05-12 11:53:04 879

原创 系统分析与设计 第六次作业

使用 UML State Model 建模对象: 参考 Asg_RH 文档, 对 Reservation/Order 对象建模。建模要求: 参考练习不能提供足够信息帮助你对订单对象建模,请参考现在 定旅馆 的旅游网站,尽可能分析围绕订单发生的各种情况,直到订单通过销售事件(柜台销售)结束订单。研究淘宝退货流程活动图,对退货业务对象状态建模1.酒店订单状态图: 2.淘宝退货状态图...

2018-05-05 22:02:42 331

原创 系统分析与设计 第五次作业

领域建模a. 阅读 Asg_RH 文档,按用例构建领域模型。按 Task2 要求,请使用工具 UMLet,截图格式务必是 png 并控制尺寸说明:请不要受 PCMEF 层次结构影响。你需要识别实体(E)和 中介实体(M,也称状态实体) 摘自Asg_RH 文档: …name your entity classes starting with letter E, and the ...

2018-04-29 23:19:09 293

原创 UML初探——用例图学习&UMLet使用详解

用例图基础知识用例图简介用例图描述的是参与者所理解的系统功能,主要元素是用例和参与者。虽然用例图不能取代文本形式的用例文档,但它简要地概括了用例文档的主要内容,项目的基本需求和需求之间的关系一目了然。在项目初始阶段,用例图可以帮助开发团队以一种可视化的方式理解系统的功能需求,从而快速地进行需求分析。用例图的组成元素参与者(Actor) 参与者指与系统交互的人或物。参与者...

2018-04-13 17:21:56 7678

原创 系统分析与设计 第四次作业

系统分析与设计 第四次作业1、 用例建模a. 阅读 Asg_RH 文档,绘制用例图。 按 Task1 要求,请使用工具 UMLet,截图格式务必是 png 并控制尺寸b. 选择你熟悉的定旅馆在线服务系统(或移动 APP),如绘制用例图。并满足以下要求: 对比 Asg_RH 用例图,请用色彩标注出创新用例或子用例尽可能识别外部系统,并用色彩标注新的外部系统和服务c. 对比两个时代、...

2018-04-11 23:10:57 450

原创 198. House Robber

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses

2018-01-12 20:39:55 213

原创 Best Time to Buy and Sell Stock I&II

121. Best Time to Buy and Sell StockSay you have an array for which the ithi^{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

2018-01-12 17:30:35 195

原创 最小和(动态规划)

Description 从数列A[0], A[1], A[2], …, A[N-1]中选若干个数,要求对于每个i(0<= i < N-1),A[i]和A[i+1]至少选一个数,求能选出的最小和.1 <= N <= 100000, 1 <= A[i] <= 1000请为下面的Solution类实现解决上述问题的函数minSum,函数参数A是给出的数列,返回值为所求的最小和.class Solutio

2018-01-11 19:55:00 540

原创 210. Course Schedule II

There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as

2018-01-11 17:04:30 181

原创 207. Course Schedule

There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as

2018-01-11 16:44:20 165

原创 证明Stingy SAT问题为NP完全问题

《算法概论》课后习题8.3: STINGY SAT is the following problem: given a set of clauses (each a disjunction of literals) and an integer k, find a satisfying assignment in which at most k variables are true, if s

2018-01-08 23:16:34 753

原创 79. 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 neig

2018-01-01 16:02:01 234

原创 78. Subsets

Given a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.For example, If nums = [1,2,3], a solution is:[ [3], [

2017-12-31 13:54:39 154

原创 77. Combinations

Given two integers n and k, return all possible combinations of k numbers out of 1 … n.For example, If n = 4 and k = 2, a solution is:[ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4],]回溯法,nums存

2017-12-31 13:35:51 212

原创 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 0, 1,

2017-12-23 00:00:07 138

原创 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 row is

2017-12-19 21:45:01 170

原创 73. Set Matrix Zeroes

Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up: Did you use extra space? A straight forward solution using O(mn) space

2017-12-19 21:15:41 215

原创 71. Simplify Path

Given an absolute path for a file (Unix-style), simplify it.For example, path = "/home/", =>"/home" path = "/a/./b/../../c/", => "/c" click to show corner cases.Corner Cases: - Did you consider the

2017-12-16 23:05:23 147

原创 70. Climbing Stairs

You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a positive inte

2017-12-16 18:17:57 162

原创 69. Sqrt(x)

Implement int sqrt(int x).Compute and return the square root of x.x is guaranteed to be a non-negative integer.Example 1:Input: 4Output: 2Example 2:Input: 8Output: 2Explanation: The square root of 8

2017-12-16 11:17:22 160

原创 67. Add Binary

Given two binary strings, return their sum (also a binary string).For example, a = "11" b = "1" Return "100".我用了最笨的方法,从后向前逐位相加,然后处理每一位的进位,最后还要单独处理第一位的进位:class Solution {public: string addBinary

2017-12-07 18:07:27 159

原创 66. Plus One

Given a non-negative integer represented as a non-empty array of digits, plus one to the integer.You may assume the integer do not contain any leading zero, except the number 0 itself.The digits are st

2017-12-04 22:08:41 179

原创 64. Minimum Path Sum

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 down or right at any

2017-12-04 21:10:39 178

原创 63. Unique Paths II

Follow up for “Unique Paths”:Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the grid.For ex

2017-12-04 18:42:11 151

原创 62. 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 botto

2017-12-04 15:35:49 186

原创 61. Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative.Example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.思路:首先遍历链表算出链表长度len,然后计算出k%len,即所需要的最小rotate次数,然后把链

2017-12-03 22:36:15 219

原创 60. Permutation Sequence

The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order, We get the following sequence (ie, for n = 3):"123""132""213""231""312""32

2017-12-03 21:16:28 160

原创 59. 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, 6, 5

2017-12-03 11:03:03 158

原创 58. Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defined as

2017-11-26 18:27:16 167

原创 56. 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].思路:按照每个interval的start值将Intervals进行排序(通过重载<运算符,使用stl的sort函数)

2017-11-26 17:10:35 149

原创 55. 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 are

2017-11-26 16:01:51 239

原创 54. Spiral Matrix

Given a matrix of m x 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 should r

2017-11-15 21:52:42 147

原创 53. 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 the

2017-11-01 23:19:28 162

原创 50. Pow(x, n)

Implement pow(x, n).刚开始想都没想就写了个循环:class Solution {public: double myPow(double x, int n) { double ans = 1.0; for (int i = 0; i < abs(n); i++) { ans *= x; }

2017-10-30 23:21:20 219

转载 STL中map用法详解

Map是STL的一个关联容器,它提供一对一(其中第一个可以称为关键字,每个关键字只能在map中出现一次,第二个可能称为该关键字的值)的数据处理能力,由于这个特性,它完成有可能在我们处理一对一数据的时候,在编程上提供快速通道。这里说下map内部数据的组织,map内部自建一颗红黑树(一种非严格意义上的平衡二叉树),这颗树具有对数据自动排序的功能,所以在map内部所有的数据都是有序的,后边我们会见识到有序

2017-10-30 22:39:32 168

原创 49. Group Anagrams

Given an array of strings, group anagrams together.For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return:[ ["ate", "eat","tea"], ["nat","tan"], ["bat"]]Note: All inputs will b

2017-10-30 22:33:48 191

原创 48. Rotate Image

You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Note: You have to rotate the image in-place, which means you have to modify the input 2D matrix direct

2017-10-26 23:36:27 170

原创 47. Permutations II

Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example, [1,1,2] have the following unique permutations:[ [1,1,2], [1,2,1], [2,1,1]]这道题和

2017-10-26 22:28:11 171

空空如也

空空如也

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

TA关注的人

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