自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 排队算法优化

排队算法优化一、起因 按照订单简单的FIFO排队,做完一桌菜再做下一桌菜,这样会导致大量的等待时间,可会体验会不太好,因此提出以下算法模型。二、若干模型以及算法细节假定我们已经清楚各个菜品制作所需要的时间;考虑A、B两桌订单时间存在重叠,B桌的菜品必须等待前一桌A桌的菜品全上完全了再开始做。考虑A桌订单提交时间为Ta0,所需时间为ta,B桌订单提交时间为Tb0,所需时间为tb,则这样决策B所需等待...

2018-07-03 21:47:41 6302

原创 系统分析与应用_EX02

系统分析与应用(二)学号:15331211姓名:刘秉运  一、简答题1. 简述瀑布模型、增量模型、螺旋模型(含原型方法)的优缺点。瀑布模型的优点:² a) 降低软件开发的复杂程度,提高软件开发过程的透明性,提高软件开发过程 的可管理性² b) 推迟软件实现,强调在软件实现前必须进行分析和设计工作² c) 以项目的阶段评审和文档控制为手段有效地对整个开发过程进行指导,保证 了阶段之间的正确衔接,...

2018-03-22 23:16:06 233

原创 系统分析与应用_EX01

系统分析与应用(一)   学号:15331211姓名:刘秉运一、简答题1. 软件工程的定义:a)将系统化、规范化、可度量的方法应用与软件的开发、运行和维护的过程,即将工程化应用于软件中。b)对a)中所述方法的研究。c)软件工程是指导计算机软件开发和维护的工程学科。采用工程的概念、原理、技术和方法来开发与维护软件,把经过实践考验而证明正确的管理技术和当前能够得到的最好的技术方法结合起来。2. 阅读经...

2018-03-15 02:22:14 415

原创 2017-09-21 LeetCode_033 Search in Rotated Sorted Array

33. Search in Rotated Sorted ArraySuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are g

2017-09-21 22:23:08 156

原创 2017-09-21 LeetCode_032 Longest Valid Parentheses

.32. Longest Valid ParenthesesGiven a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid

2017-09-21 22:04:28 306

原创 2017-09-21 LeetCode_031 Next Permutation

31. Next PermutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange

2017-09-21 21:27:09 168

原创 2017-09-19 LeetCode_030 Substring with Concatenation of All Words

30. Substring with Concatenation of All WordsYou are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a

2017-09-19 15:14:35 289

原创 2017-09-17 LeetCode_029 Divide Two Integers

29. Divide Two IntegersDivide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.solution:class Solution {

2017-09-18 01:10:31 337

原创 2017-09-17 LeetCode_028 Implement strStr()

28. Implement strStr()Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.solution:class

2017-09-18 00:48:25 346

原创 2017-09-17 LeetCode_027 Remove Element

27. Remove ElementGiven an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place w

2017-09-18 00:35:08 350

原创 2017-09-16 LeetCode_514 Freedom Trail

514. Freedom TrailIn the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial to spell a specific keyword

2017-09-17 01:51:46 176

原创 2017-09-15 LeetCode_493 Reverse Pairs

493. Reverse PairsGiven an array nums, we call (i, j) an important reverse pair if i  and nums[i] > 2*nums[j].You need to return the number of important reverse pairs in the given array.

2017-09-15 18:48:43 282

原创 2017-09-14 LeetCode_327 Count of Range Sum

327. Count of Range SumGiven an integer array nums, return the number of range sums that lie in [lower, upper] inclusive.Range sum S(i, j) is defined as the sum of the elements in nums bet

2017-09-14 21:07:12 152

原创 2017-09-14 LeetCode_315 Count of Smaller Numbers After Self

315. Count of Smaller Numbers After SelfYou are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smal

2017-09-14 03:00:48 171

原创 2017-09-13 LeetCode_312 Burst Balloons

312. Burst BalloonsGiven n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst

2017-09-14 01:52:30 204

原创 2017-09-13 LeetCode_282 Expression Add Operators

282. Expression Add OperatorsGiven a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so

2017-09-14 01:08:45 128

原创 2017-09-13 LeetCode_241 Different Ways to Add Parentheses

282. Expression Add OperatorsGiven a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so

2017-09-14 01:06:47 135

原创 2017-09-13 LeetCode_241 Different Ways to Add Parentheses

241. Different Ways to Add ParenthesesGiven a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The va

2017-09-13 14:29:17 184

原创 2017-09-13 LeetCode_240 Search a 2D Matrix II

240. Search a 2D Matrix IIWrite 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 in ascending

2017-09-13 13:07:42 220

原创 2017-09-12 LeetCode_218 The Skyline Problem

218. The Skyline ProblemA city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you aregiven the locations and

2017-09-13 02:29:58 222

原创 2017-09-12 LeetCode_215 Kth Largest Element in an Array

215. Kth Largest Element in an ArrayFind 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-12 14:04:00 129

原创 2017-09-12 LeetCode_169 Majority Element

169. Majority ElementGiven an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empt

2017-09-12 11:38:58 135

原创 2017-09-12 LeetCode_053 Maximum Subarray

53. Maximum SubarrayFind 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 contigu

2017-09-12 11:22:23 137

原创 2017-09-12 LeetCode_026 Remove Duplicates from Sorted Array

26. Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space fo

2017-09-12 11:05:30 157

原创 2017-09-11 LeetCode_025 Reverse Nodes in k-Group

25. Reverse Nodes in k-GroupGiven a linked list, reverse the nodes of a linked list k at a time and return its modified list.k is a positive integer and is less than or equal to the length o

2017-09-11 13:17:53 174

原创 2017-09-11 LeetCode_024 Swap Nodes in Pairs

24. Swap Nodes in PairsGiven 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 algorithm should

2017-09-11 11:32:54 127

原创 2017-09-11 LeetCode_023 Merge k Sorted Lists

23. Merge k Sorted ListsMerge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.solution:class Solution {2

2017-09-11 11:20:16 135

原创 2017-09-11 LeetCode_022 Generate Parentheses

22. Generate ParenthesesGiven 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-09-11 10:58:50 125

原创 2017-09-11 LeetCode_021 Merge Two Sorted Lists

21. Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.solution:

2017-09-11 10:37:33 165

原创 2017-09-10 LeetCode_020 Valid Parentheses

20. Valid ParenthesesGiven a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()

2017-09-10 17:42:16 101

原创 2017-09-10 LeetCode_019 Remove Nth Node From End of List

19. Remove Nth Node From End of ListGiven 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. After

2017-09-10 17:22:24 108

原创 2017-09-10 LeetCode_018 4Sum

18. 4SumGiven an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note

2017-09-10 17:00:14 137

原创 2017-09-10 LeetCode_017 Letter Combinations of a Phone Number

17. Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telepho

2017-09-10 16:22:07 202

原创 2017-09-09 LeetCode_016 3Sum Closest

16. 3Sum ClosestGiven an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that eac

2017-09-09 17:32:55 153

原创 2017-09-09 LeetCode_015 3Sum

15. 3SumGiven an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set mu

2017-09-09 17:16:13 199

原创 2017-09-09 LeetCode_014 Longest Common Prefix

14. Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.solution:class Solution {2public:

2017-09-09 15:34:26 138

原创 2017-09-09 LeetCode_013 Roman to Integer

13. Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.solution:class Solution {

2017-09-09 15:24:23 175

原创 2017-09-09 LeetCode_012 Integer to Roman

12. Integer to RomanGiven an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.solution:class Sol

2017-09-09 15:06:26 122

原创 2017-09-09 LeetCode_011 Container With Most Water

11. Container With Most WaterGiven 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

2017-09-09 14:58:00 107

原创 2017-09-09 LeetCode_010 Regular Expression Matching

10. Regular Expression MatchingImplement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The ma

2017-09-09 14:15:39 179

空空如也

空空如也

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

TA关注的人

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