![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法分析与设计课程
Brother_Xiang
这个作者很懒,什么都没留下…
展开
-
算法分析与设计课程02——315. Count of Smaller Numbers After Self (Hard难度)
Count of Smaller Numbers After Self (Hard难度),算法,C++,归并,分治算法原创 2017-03-04 11:43:09 · 478 阅读 · 0 评论 -
算法分析与设计课程16——376. Wiggle Subsequence
一、题目——————原题链接A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. The first difference (if one exists) may原创 2017-06-11 17:59:42 · 322 阅读 · 0 评论 -
算法分析与设计课程17——435. Non-overlapping Intervals
一、题目描述——原题链接Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.Note: You may assume the interval’s end point is原创 2017-06-16 18:14:40 · 448 阅读 · 0 评论 -
算法分析与设计课程15——377. Combination Sum IV
Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target.nums = [1, 2, 3] target = 4The possibl原创 2017-06-04 22:57:21 · 299 阅读 · 0 评论 -
算法分析与设计课程14——416. Partition Equal Subset Sum
Partition Equal Subset Sum Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements原创 2017-06-04 20:40:14 · 375 阅读 · 0 评论 -
算法分析与设计课程13——413. Arithmetic Slices
Arithmetic Slices A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same.原创 2017-06-04 19:42:36 · 303 阅读 · 0 评论 -
算法分析与设计课程12——486. Predict the Winner
Preidct the Winner Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and then player 1 and so on. Each time a pla原创 2017-06-04 18:22:54 · 359 阅读 · 0 评论 -
算法分析与设计课程11——467. Unique Substrings in Wraparound String(Medium)
467. Unique Substrings in Wraparound String原创 2017-05-17 22:52:25 · 257 阅读 · 0 评论 -
算法分析与设计课程10——523. Continuous Subarray Sum
523. Continuous Subarray Sum原创 2017-05-16 22:36:52 · 297 阅读 · 0 评论 -
算法分析与设计课程09——474. Ones and Zeroes(Medium)
Ones and Zeroes原创 2017-05-15 20:17:14 · 402 阅读 · 0 评论 -
算法分析与设计课程08——516. Longest Palindromic Subsequence(Medium)
一、问题描述————————链接Given a string s, find the longest palindromic subsequence’s length in s. You may assume that the maximum length of s is 1000.Example 1: Input:"bbbab" Output:4 One possible longest pali原创 2017-05-15 09:32:38 · 300 阅读 · 0 评论 -
算法分析与设计课程07——330. Patching Array(Hard)
Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be formed by the sum of some elements in the array. Return the min原创 2017-05-01 21:36:32 · 309 阅读 · 0 评论 -
算法分析与设计课程05——514. Freedom Trail(Hard)
Freedom Trail In 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 in order to open the原创 2017-03-27 00:29:04 · 398 阅读 · 0 评论 -
算法分析与设计课程06——542. 01 Matrix(Medium)
542. 01Matrix Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. C++原创 2017-04-09 19:48:03 · 331 阅读 · 0 评论 -
算法分析与设计课程03——Expression Add Operators(Hard)
Expression Add Operators Given 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 they e原创 2017-03-12 15:54:32 · 328 阅读 · 0 评论 -
算法分析与设计课程04——Target Sum(Medium)
一、题目描述(中文)原题链接给出一个数组a[]和一个目标值S,对于数组中的每个数,只使用“+”和“-”运算操作符,使得数组a[]的组合等于S,如下例Input: nums is [1, 1, 1, 1, 1], S is 3. Output: 5 Explanation: -1+1+1+1+1 = 3 +1-1+1+1+1 = 3 +1+1-1+1+1 = 3 +1+1+1-1+1 = 3 +1+原创 2017-03-20 09:05:39 · 565 阅读 · 0 评论 -
算法分析与设计课程01——495. Teemo Attacking
一、题目描述(中文)原题链接 在LLP的世界里,有一个名叫Teemo的英雄,他的攻击可以让他的敌人Ashe陷入中毒的状态。现在,我们将给出Teemo对Ashe发起攻击的时间点的上升序列,以及每次攻击后Ashe中毒状态持续的时间,你需要输出Ashe处于中毒状态的时间总和。假设Teemo的攻击发起在每个时间点的最开端,并且在发起攻击时便立刻使Ashe陷入中毒状态。例1:输入:[1.4],2 输出:4原创 2017-02-25 21:52:23 · 340 阅读 · 0 评论 -
算法分析与设计课程18——《算法概论》8.19
一、问题描述所谓风筝图是这样的,其顶点数为偶数(比如2n),且其中的n个顶点构成了一个团,剩余的n个顶点则由一条称为“尾巴”的路径连接,尾巴的某个端点与团中一个顶点相连。给定一个图和目标g,风筝图问题要求该图的一个包含2g个顶点的风筝子图。请证明该问题是NP-完全的。二、证明要求一个图G(V,E)能够构造出,包含2g个顶点的风筝子图,则需要该子图的g个顶点形成团G’,另外g个顶点连成一条线G”,且G原创 2017-07-14 22:27:10 · 382 阅读 · 0 评论