- 博客(19)
- 收藏
- 关注
原创 最后的作业:STINGY SAT问题
8.3 STINGY SAT 问题 In order to prove that STINGY SAT is an NP-complete problem,we firstly prove that (1)STINGY SAT is an NP problem and then (2) SAT problem 归约于 STINGY SAT.PROVE(1): STINGY SA
2017-07-15 11:40:10
442
原创 算法设计与结构基础作业第十七周
322.Coin ChangeDescription:You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up th
2017-06-21 21:35:18
198
原创 算法设计与结构基础作业第十六周
62.Unique PathsDescription: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. Th
2017-06-11 23:02:46
176
原创 算法设计与结构基础作业第十五周
121.Best Time to Buy and Sell StockDescription:Say you have an array for which the ith element is the price of a given stock on dayi.If you were only permitted to complete at most one transa
2017-06-04 23:51:10
169
原创 算法设计与结构基础作业第十四周
35.Search Insert PositionDescription:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.Y
2017-06-04 23:41:45
184
原创 算法设计与结构基础作业第十三周
258.Add DigitsDescription:Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example: Given num = 38, the process is like: 3 + 8 = 11,
2017-05-21 22:44:25
165
原创 算法设计与结构基础作业第十二周
55.Jump GameDescription: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 t
2017-05-14 20:56:29
231
原创 算法结构与设计基础作业第十一周
120.TriangleDescription:Given 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
2017-05-07 22:59:10
249
原创 算法设计与结构基础作业第十周
198.House RobberDescription: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 e
2017-05-07 22:51:05
253
原创 算法结构与设计基础作业第九周
21.Merge Two Sorted ListsDescription:Merge 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 listsMy C++ code:/
2017-04-23 21:28:50
153
原创 算法结构与设计基础作业第八周
303.Range Sum Query-ImmutabeDescription:Given an integer array nums, find the sum of the elements between indicesi and j (i ≤ j), inclusiveExample:Given nums = [-2, 0, 3, -5, 2, -1]sum
2017-04-23 21:08:50
160
原创 算法设计与结构基础作业第七周
389.Find the DifferenceDescription:Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random
2017-04-07 23:24:55
187
原创 算法设计与结构基础作业第六周
344.Reverse StringDecription:Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh". My C++ code:class Solution {public:
2017-04-07 22:40:01
166
原创 算法设计与结构基础作业第五周
412.Fizz BuzzWrite a program that outputs the string representation of numbers from 1 ton.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five out
2017-04-07 22:07:59
164
原创 算法设计与应用基础作业第四周
535. Encode and Decode TinyURLDecription:Note: This is a companion problem to the System Design problem: Design TinyURL.TinyURL is a URL shortening service where you enter a URL such as ht
2017-03-20 13:45:35
158
原创 算法设计与应用基础作业第三周
448. Find All Numbers Disappeared in an Array Description:Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all
2017-03-12 22:20:54
136
原创 算法设计与应用基础作业第一周
520. Detect Capital Given a word, you need to judge whether the usage of capitals in it is right or not.We define the usage of capitals in a word to be right when one of the following
2017-03-05 19:49:50
213
原创 算法设计与应用基础作业第二周
171. Excel Sheet Column Number Description Submission SolutionsTotal Accepted: 119263Total Submissions: 260709Difficulty: EasyContributors: Admin Related to question
2017-03-05 19:45:06
202
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人