- 博客(61)
- 资源 (1)
- 收藏
- 关注
原创 系统分析与设计Homework9
15331151李佳一、使用 ECB 实现 make reservation 用例的详细设计(包含用例简介,顺序图,类图)。(1)用例简介:(2)顺序图:(3)类图:二、将逻辑设计类图映射到实际项目框架的包图。用树形结构表述实现的包和类。Project bin www //可执行文件models //存放数据库文件 d...
2018-06-30 14:13:48
267
原创 架构建模 - 云时代的架构实践
2015级计应 15331151 李佳一、描述软件架构与框架之间的区别与联系1.软件框架 软件框架是面向领域(如ERP、计算领域等)的、可复用的“半成品”软件,它实现了该领域的共性部分,并提供了一些定义良好的可变点以保证灵活性和可扩展性。也就是说软件框架是领域分析结果的软件化,是领域内最终应用的模板。随着软件规模的扩大、应用广泛和软件复用技术的发展,以子程序和类为单位的软件复用出...
2018-05-29 16:26:36
516
原创 系统分析与设计个人作业Lesson8
学号:15331151姓名:李佳一、个人作业建模工具: UMLet 14.1.1 stand-alone1)使用 UML State Model建模对象: 参考 Asg_RH 文档, 对 Reservation/Order 对象建模。 建模要求: 参考练习不能提供足够信息帮助你对订单对象建模,请参考现在 定旅馆 的旅游网站,尽可能分析围绕订单发生的各种情况,直到订单通...
2018-05-03 22:59:14
199
原创 [LeetCode-Algorithms-517] "Super Washing Machines" (2018.1.8-WEEK19)
题目链接:Super Washing Machines 题目描述: You have n super washing machines on a line. Initially, each washing machine has some dresses or is empty. For each move, you could choose any m (1 ≤ m ≤ n)
2018-01-08 22:02:03
291
原创 [LeetCode-Algorithms-223] "Rectangle Area" (2018.1.1-WEEK18)
题目链接:Rectangle Area 题目描述: Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner as shown in the fig
2018-01-01 22:14:34
226
原创 [LeetCode-Algorithms-216] "Combination Sum III" (2018.1.1-WEEK18)
题目链接:Combination Sum III题目描述: Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of num
2018-01-01 22:04:55
201
原创 算法概论第8章习题 8.14
题目: 证明如下问题是NP-完全的: 给定一个无向图G=(V, E)和整数k,求G中一个规模为k的团以及一个规模为k 的独立集。假定他们都是存在的。证明:(1)团:顶点子集V’⊆V,每一对定点间都由E中的一条边连接,即团是G的完全子图。 对于一个给定图G = (V, E),团中顶点集V’,对任一对顶点u, v∈V’,检查边(u, v)是否属于E,就可以在多项式时间确定V’是不是团。
2017-12-27 21:57:02
415
原创 [LeetCode-Algorithms-73] "Set Matrix Zeroes" (2017.12.26-WEEK17)
题目链接: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. Did you use extra space? A straight forward solution using O(mn)
2017-12-26 14:51:25
212
原创 [LeetCode-Algorithms-89] "Gray Code" (2017.12.26-WEEK17)
题目链接:Gray Code 题目描述: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the c
2017-12-26 14:31:24
202
原创 [LeetCode-Algorithms-144] "Binary Tree Preorder Traversal" (2017.12.21-WEEK16)
题目链接: 题目描述: Given a binary tree, return the preorder traversal of its nodes’ values. For example: Given binary tree [1,null,2,3], 1 \ 2 / 3 return [1,2,3].
2017-12-21 11:28:44
198
原创 [LeetCode-Algorithms-147] "Insertion Sort List" (2017.12.21-WEEK16)
题目链接:Insertion Sort List 题目描述: Sort a linked list using insertion sort. (1)思路:将链表分为两部分,前半部分为已经排序好的,后半部分是未排序的,用指针指向未排序的头结点,遍历已经排序的部分,找到第一个大于该值的节点,然后将其插入到该节点之前一个位置即可;未排序部分的头结点向后移一个节点即可,直至遍历完
2017-12-21 10:58:05
201
原创 [LeetCode-Algorithms-128] "Longest Consecutive Sequence" (2017.12.14-WEEK15)
题目链接:Longest Consecutive Sequence 题目描述: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2],
2017-12-14 13:42:32
244
原创 [LeetCode-Algorithms-139] "Word Break" (2017.12.14-WEEK15)
题目链接:Word Break 题目描述: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dicti
2017-12-14 13:25:10
197
原创 [LeetCode-Algorithms-537] "Complex Number Multiplication" (2017.12.7-WEEK14)
题目链接:Complex Number Multiplication 题目描述: Given two strings representing two complex numbers. You need to return a string representing their multiplication. Note i2 = -1 according to the defin
2017-12-07 19:23:48
163
原创 [LeetCode-Algorithms-75] "Sort Colors" (2017.12.7-WEEK14)
题目链接: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. He
2017-12-07 19:04:13
157
原创 [LeetCode-Algorithms-39] "Combination Sum" (2017.11.29-WEEK13)
题目链接:Combination Sum 题目描述: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same
2017-11-29 11:24:53
162
原创 [LeetCode-Algorithms-40] "Combination Sum II" (2017.11.29-WEEK13)
题目链接:Combination Sum II 题目描述: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C ma
2017-11-29 11:00:25
163
原创 [LeetCode-Algorithms-62] "Unique Paths" (2017.11.21-WEEK12)
题目链接: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
2017-11-21 23:05:43
185
原创 [LeetCode-Algorithms-49] "Group Anagrams" (2017.11.21-WEEK12)
题目链接:Group Anagrams 题目描述: Given an array of strings, group anagrams together. For example, given: [“eat”, “tea”, “tan”, “ate”, “nat”, “bat”], Return: [ ["ate", "eat","tea"], ["n
2017-11-21 21:28:18
176
原创 [LeetCode-Algorithms-19] "Remove Nth Node From End of List" (2017.11.16-WEEK11)
题目链接:Remove Nth Node From End of List 题目描述: Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2.
2017-11-16 10:25:49
279
原创 [LeetCode-Algorithms-48] "Rotate Image" (2017.11.16-WEEK11)
题目链接: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 y
2017-11-16 10:04:08
157
原创 Martini框架初学与源码解读
Martini框架是使用Go语言作为开发语言的一个强力的快速构建模块化web应用与服务的开发框架。一、安装go get github.com/codegangsta/martini二、使用可以使用如下的代码来测试我们安装的包是否可用:server.gopackage mainimport "github.com/codegangsta/martini"func main() { m := mar
2017-11-13 18:42:45
745
原创 [LeetCode-Algorithms-647] "Palindromic Substrings" (2017.11.7-WEEK10)
题目链接:Palindromic Substrings 题目描述: Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are counted
2017-11-07 20:44:22
155
原创 [LeetCode-Algorithms-24] "Swap Nodes in Pairs" (2017.11.7-WEEK10)
题目链接:Swap Nodes in Pairs 题目描述: Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your a
2017-11-07 20:34:14
176
原创 [LeetCode-Algorithms-55] "Jump Game" (2017.11.7-WEEK10)
题目链接: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 th
2017-11-07 20:20:19
180
原创 golang语言乱谈之Interface
Go不是典型的OO语言,它在语法上不支持类和继承的概念。但是Go语言引入了一种新类型—Interface,它在效果上实现了类似于C++的“多态“。Go语言官网对于Interface类型的描述是: An interface type specifies a method set called its interface. A variable of interface type can store
2017-11-05 19:52:55
314
原创 [LeetCode-Algorithms-20] "Valid Parentheses" (2017.11.1-WEEK9)
题目链接:Valid Parentheses 题目描述: Given a string containing just the characters(, ), {, }, [ and ], determine if the input string is valid. The brackets must close in the correct order, () and ()[
2017-11-01 23:13:04
161
原创 [LeetCode-Algorithms-65] "Valid Number" (2017.11.1-WEEK9)
题目链接:Valid Number 题目描述: Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => true Note: It is intended for the problem s
2017-11-01 22:51:29
178
原创 [LeetCode-Algorithms-50] "Pow(x, n)" (2017.10.25-WEEK8)
题目链接:Pow(x, n) 题目描述: Implement pow(x, n). (1)思路:分情况先把结果最简单的一些情况输出,然后使用分治将问题转化为两个 pow(x*x, n / 2)相乘,然后递归调用直到最后刚好乘完或者剩余一项(正或者负)。(2)代码:class Solution {public: double myPow(double x, int
2017-10-25 23:01:31
154
原创 [LeetCode-Algorithms-22] "Generate Parentheses" (2017.10.25-WEEK8)
题目链接:Generate Parentheses 题目描述: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ “(
2017-10-25 22:38:15
148
原创 [LeetCode-Algorithms-53] "Maximum Subarray" (2017.10.19-WEEK7)
题目链接: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
2017-10-19 22:25:43
155
原创 [LeetCode-Algorithms-32] "Longest Valid Parentheses" (2017.10.19-WEEK7)
题目链接:Longest Valid Parentheses 题目介绍: Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring. Another example i
2017-10-19 21:49:13
229
原创 [LeetCode-Algorithms-91] "Decode Ways" (2017.10.19-WEEK7)
题目链接: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
2017-10-19 21:30:26
174
原创 使用golang开发selpg命令行程序
Selpg Selpg is a utility that selects page range from text input. The input can come from the file specified as the last command line parameter, and can also be from standard input when no file name
2017-10-19 12:51:36
491
原创 [LeetCode-Algorithms-26] "Remove Duplicates from Sorted Array" (2017.10.12-WEEK6)
题目链接:Remove Duplicates from Sorted Array 题目描述: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra sp
2017-10-12 21:10:58
176
原创 [LeetCode-Algorithms-10] "Regular Expression Matching" (2017.10.12-WEEK6)
题目链接:Regular Expression Matching 题目描述: Implement regular expression matching with support for ‘.’ and ‘*’. ‘.’ Matches any single character. ‘*’ Matches zero or more of the precedin
2017-10-12 21:03:07
230
原创 [LeetCode-Algorithms-17] "Letter Combinations of a Phone Number" (2017.10.12-WEEK6)
题目链接:Letter Combinations of a Phone Number 题目描述: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the
2017-10-12 20:47:02
211
原创 [LeetCode-Algorithms-11] "Container With Most Water" (2017.10.2-WEEK5)
题目链接: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 lin
2017-10-02 10:46:42
164
原创 [LeetCode-Algorithms-12] "Integer to Roman" (2017.10.2-WEEK5)
题目链接:Integer to Roman 题目描述: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.(1)思路:和上次那个Roman to Integer 一样,需要先搞清楚罗马字母的表示方法。然后用贪心算法,
2017-10-02 10:25:15
200
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人