自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

qq_26304333的博客

纯个人学习笔记记录

  • 博客(65)
  • 收藏
  • 关注

原创 [c++基础] 序

目录程序设计基本概念预处理,const指针与sizeof共有数据保护,静态成员,运算符重载指针与引用函数参数传递,数组面向对象基础:类的四个基本函数封装,继承和多态模板与深/浅复制内存,堆栈,资源,异常处理相关问题四种类型转换和隐式类型转换STL智能指针

2017-04-18 16:31:29 197

原创 [leetcode]第18周作业

题目:120. TriangleGiven 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[

2018-01-07 10:32:35 266

原创 [leetcode]第17周作业

解:我们可以把最大独立集问题规约到最大公共子图问题。对于任意的图 G(V, E),我们要求它的大小为b的独立集(即最大独立集), 我们可以令G1= G(V, E), G2= G(V, ),我们要求G 的最大独立集,可以转化为从G(V, E)中删除最少的顶点,使得余下的顶点 V' 相互独立, 即最后的图 为 G‘(V‘, ),也就是G1,G2存在大小为b的最大公共子图。因此,于是G1,G2存

2017-12-30 11:47:35 251

原创 [leetcode] 第16周作业

题目:654. Maximum Binary TreeGiven an integer array with no duplicates. A maximum tree building on this array is defined as follow:1.The root is the maximum number in the array. 2.The left subtree is th

2017-12-24 09:50:39 229

原创 [leetcode]第15周作业

题目: 547. Friend CirclesThere are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct friend of B, and B is a dir

2017-12-17 10:43:31 193

原创 [leetcode]第14周作业

题目:152. Maximum Product SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4], the contiguous su

2017-12-09 15:33:20 166

原创 [leetcode]第13周作业

题目:525. Contiguous Array Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1.Example 1: Input: [0,1] Output: 2 Explanation: [0, 1] is the longe

2017-12-02 16:50:35 139

原创 [leetcode]第12周作业

问题:452. Minimum Number of Arrows to Burst BalloonsThere are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the hori

2017-11-26 09:51:08 159

原创 [leetcode]第11周作业

题目: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 tryin

2017-11-19 14:25:53 143

原创 [leetcode]第十周作业

题目:< leetcode > 300. Longest Increasing SubsequenceGiven an unsorted array of integers, find the length of longest increasing subsequence.For example, Given [10, 9, 2, 5, 3, 7, 101, 18], The longest

2017-11-11 09:38:39 179

原创 [leetcode]第九周作业

题目来源: < leetcode > 343 . Integer BreakGiven a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you ca

2017-11-04 22:53:48 181

原创 [leetcode]第八周作业

题目来源: < leetcode > 400. Nth Digit题目: Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, …Note: n is positive and will fit within the range of a 32-bit signed int

2017-10-30 11:46:14 248

原创 [leetcode]第七周作业

题目:134. Gas StationThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from s

2017-10-22 11:15:43 477

原创 [leetcode] 第六周作业

题目一453.Minimum Moves to Equal Array ElementsGiven a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n - 1 ele

2017-10-13 13:08:16 170

原创 [leetcode] 第五周作业

题目来源:8. String to Integer (atoi)题目:Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself

2017-10-09 20:44:09 138

原创 [leetcode] 第四周作业

题目来源: 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 contiguo

2017-09-27 10:40:12 177

原创 [leetcode] 第三周作业

题目来源: 215. Kth Largest Element in an Array题目: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,

2017-09-21 13:43:54 430

原创 [leetcode] 第一周作业

题目来源: 14. Longest Common Prefix题目 Write a function to find the longest common prefix string amongst an array of strings.分析: 比较直白的思路: 初始化公共前缀就是第一个字符串,然后和后面的每一个字符串比较,寻找与公共前缀中相等的前缀长度代码:class Solution {

2017-09-21 13:33:41 171

原创 [leetcode] 第二周作业

题目来源:  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,

2017-09-18 09:40:47 347

原创 C++文件读写与getline()

1.ofstream头文件: 文件不存在时会自动创建文件当文件读写操作完成之后,我们必须将文件关闭以使文件重新变为可访问的。成员函数close(),它负责将缓存中的数据排放出来并关闭文件。这个函数一旦被调用,原先的流对象就可以被用来打开其它的文件了,这个文件也就可以重新被其它的进程所访问了。为防止流对象被销毁时还联系着打开的文件,析构函数将会自动调用关闭函数close。

2017-07-01 11:02:48 43413 5

原创 [系分] 状态图

每一个用例有一个状态图,显示一个对象从创建到消亡的整个生命周期绘图要点:要求:对象(描述哪一个的状态)状态名字不要动词有起点,终点转移:事件名 [条件]/动作名(如果前面出现“/”,说明是系统的动作,不加是使用者进行的操作)有明确的模式例子:Develop a UML state model for the control process

2017-06-04 15:56:58 392

原创 [系分] 用例图

绘图要点:用例是动词或者动名词。可以从每一个界面的主要功能来析取用例。适当的外部系统,系统与设备放右边不要出现注册参与者关联最基本的业务不考语义,只要符号正确用例图不出现名词,尽量简单,层次太多会扣分,中间尽量保持两层includes和extends区别:前者是必须包含的步骤,后者是可选的步骤例子:背单词酒店预定:

2017-06-04 14:47:14 1654

原创 [系分] 设计对象的原则

GRASP:Designing Objects with Responsibilities阅读书上第17章outputs of object DesignUML 交互图、类图、包图UI草图和原型数据库模型报表的草图和原型Responsibility-Driven DesignUML把职责定义为类元的契约或义务对象的行为职责自身执行一些行为,如创建

2017-06-01 17:30:18 438

原创 [系分] 面向对象设计

On to Object Design阅读书上第14章三种设计对象的方式codedraw, then codeonly draw编码前会是UML需要话费多少时间几个小时至多1天Designing objects动态建模:交互图(顺序图或通信图等)静态建模:最常见的UML类图Fundamental object design

2017-06-01 17:28:29 317

原创 [系分] 部署图

只考三个符号:节点,准线,节点与节点的联系注意点:节点之间没有箭头,节点是软件还是物理设备需要标记,需要写清连接的介质(如网线那些),协议(HTTP等)(整个系统就一个)可通过修改下面这个基础模型来做例子:The architect(架构师) studied the use case “打卡”, he want a DB server to hold use

2017-06-01 15:13:01 321

原创 [系分] 设计类图

绘图要点:和前面的图一一对应把顺序图的一个一个画下来(和顺序图对应,分为实体类(领域模型的类),边界类(界面),控制类),重要属性从前面拿过来领域模型的依赖,要不是属性,要不依赖,要不继承顺序图里的箭头指向哪里,这里就在哪里重要的是保持一致性!属性不要乱写,重点是方法,属性少些不重要 组合>聚合>关联>依赖注意:类名需要和领域模型,顺

2017-06-01 10:44:20 1261

原创 [系分] 包图

绘图要点:要写具体的东西UI:涉及的页面controller:按照规程,类图的第一层domain layer:背单词涉及的单词foundation:外部设备例子:For OO architecture design, we always use MVC pattern to build layer architecture. Develop apacka

2017-05-31 22:35:41 440

原创 [系分] 顺序图

在时间上对象交互的安排角色(Actor)系统角色,可以是人、及其甚至其他的系统或者子系统。BCE模式,将对象分为三类:边界类(boundary class),控制类(control class)和实体类(entity class)应用BCE模式规则:1.针对每一个用例,可以对应生成一个控制类2.参与者对象只能跟边界对象互动3.实体对象不能

2017-05-31 22:06:54 2799

原创 [系分] 序

基础知识总结:系统分析与设计概要初始阶段细化阶段-基础迭代逻辑架构和包图面向对象设计设计对象的准则UML九大图设计:1. 用例图2.状态图3.活动图4.领域模型5.系统顺序图SSD6.包图7.顺序图8.设计类图9.部署图

2017-05-31 10:14:25 429

原创 [系分] 逻辑架构和包图

Requirements to Design Iteratively阅读书上第12章需求和面向对象分析重点关注 做正确的事后续的设计工作强调 正确地做事迭代从需求和分析为主 到 以设计和实现为主在设计和实现的迭代早期有需求变更很正常,后期稳定就会稳定完成迄今为止所有建模正常只需要花费几个小时或几天的时间Logical Architecture and UML packa

2017-05-26 20:14:14 1043 1

原创 [系分] Function Model

知识点:系统顺序图:学会使用系统顺序图 (System Sequence Diagram) 描述应用对系统的功能需要。操作契约:使用操作契约(Operation contracts)描述数据的变化。对于用例的一个特定场景(一般是一个用例),外部参与者产生的事件,其顺序和系统之类的事件。该图强调的是从参与者到系统的跨越系统边界的事件。(也就是说系统被视为黑盒)注意:一般只需用

2017-05-26 18:33:08 562

原创 [课程设计] Medrank高维近似最近邻查询算法

项目简介:以B+树为索引的基于随机投影技术的高维近似最近邻查询(1)   关于c-ANN:(2)   关于Medrank:(3) 关于数据集:阶段简介:B+树节点:B+树草图:几个问题:1.为什么不用哈希索引?

2017-04-23 10:16:55 940

原创 [SYSU实训] Agenda

项目简介:开发一个基于命令行的议程管理系统。系统需提供用户登录,新用户注册,已注册用户登陆后用户可以注销(delete)当前用户账户,查询(query)用户名单,也可以添加(add)、删除(delete)、查询(query)系统中记录的会议安排等管理功能。在这个案例中,利用面向对象程序的设计和实现技术,按用户需求对整个程序框架进行设计和实现,并逐步完成基本和扩展功能。通过此项目掌握在Lin

2017-04-23 10:08:03 2001

原创 [SYSU实训] GridWorld

项目简介: GridWorld案例是一个基于图形化环境用于可视化对象在二维网格中的交互。设计和制造各种Actor的对象,将它们添加到一个网格中,并且根据一定的规则决定Actor的行为。此外还有增加了两个扩展任务, N-Puzzle和MazeBug。N-Puzzle:利用广度优先搜索算法,启发式搜索A*算法完成重拼图游戏;MazeBug:采用深度优先搜索走出迷宫。通过此项目实训能

2017-04-23 09:56:56 4881

原创 [系分] 细化阶段-基础迭代

Iteration 1 Basics阅读书上第8章在迭代开发中不是一次性实现所有需求,而是在多次迭代中对同一个用例进行增量开发Elaboration(细化)是一般项目中最初的一系列迭代构建核心架构定义主要需求解决/规避高风险元素、估计整体进度安排和资源相关制品领域模型设计模型:软件类图、对象交互图、包图软件架构文档数据模型:数据库建模用例stor

2017-04-23 09:46:13 632

原创 [系分] 初始阶段

初始阶段:利益相关人就产品范围、愿景、使用场景达成一致Inception is not requirements phase阅读书上第4章Inception Phase 初始阶段:预见项目的范围、设想和业务案例初始阶段需要考虑的事情:继续还是停止?购买还是自己构建?话费?涉众是否有统一看法?大多数analysis 是在elaboration中进行的incepti

2017-04-23 09:41:43 686

原创 [Spring MVC] 入门基础

(ps: 这篇文章简要的讲述 JavaWeb开发的 Spring MVC 框架基础,由于是初学Spring MVC,然后便上手做系统分析与设计的大作业,做的总结可能有些瑕疵,对一些概念的理解可能比较片面,欢迎大神纠错)目录:目录MVC框架优点缺点Spring的MVC框架简单原理第一步pomxml第二步webxml第三步Controller类第四步spring-servletxml

2017-04-18 15:52:23 292

原创 [系分] 活动图Activity diagram

例子:淘宝退货业务亲,收到商品描述不符,请按照以下步骤操作:1.若交易还未确认收货,您可以登录【我的淘宝】—【已买到的宝贝】找到对应订单,在订单后面点击【退款/退货】( 如何申请退款? ),同时上传商品描述不符的相关凭证。2.若订单已经交易成功且时间在15天内,您可以登录【我的淘宝】—【已买到的宝贝】找到对应订单,在订单后面点击【申请售后】( 如何申请售后? ),同时上传商

2017-04-13 14:26:33 915

原创 [系分] Domain Model

一组没有定义操作(方法的特征标记)的类图,也称为概念类图步骤:(1)寻找概念类概念类:思想,事物或对象(也就是说找名词)描述类:描述其他事物的信息,如Flight和Airport之间最好添加一个FlightDescription这个描述类。(2)将其绘制为UML类图的类(3)添加关联和属性关联:名称需要首字母大写,一般以类名-动词

2017-04-13 09:52:50 773

原创 [系分]SE&OOAD&UP

SE(软件工程)软件工程的概念在导论这门课介绍的比较清楚。这个地方,我们回想这几个概念,有个自己的理解就好:理解软件工程为什么学软工?软工的知识体系若干重要概念软工的演变与趋势OOAD几个课外的概念software crisis:is a term used in the early days of computing s

2017-04-09 14:08:09 477

空空如也

空空如也

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

TA关注的人

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