mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[LintCode] Problem 903 - Range Addition

Posted on 2019-09-21 | In Algorithm , LintCode
Assume you have an array of length n initialized with all 0’s and are given k update operations. Each operation is represented as a triplet: [startInd ...
Read more »

[LeetCode] Problem 674 - Longest Continuous Increasing Subsequence

Posted on 2019-09-18 | In Algorithm , LeetCode
Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). ExampleNo.1Input: [1,3,5,4,7] Output: 3 ...
Read more »

[LeetCode] Problem 594 - Longest Harmonious Subsequence

Posted on 2019-09-18 | In Algorithm , LeetCode
We define a harmounious array as an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arr ...
Read more »

[LeetCode] Problem 581 - Shortest Unsorted Continuous Subarray

Posted on 2019-09-18 | In Algorithm , LeetCode
Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be ...
Read more »

[LeetCode] Problem 680 - Valid Palindrome II

Posted on 2019-09-18 | In Algorithm , LeetCode
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. ExampleNo.1Input: “aba” Output: True No. ...
Read more »

[LeetCode] Problem 575 - Distribute Candies

Posted on 2019-09-17 | In Algorithm , LeetCode
Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of th ...
Read more »

[LeetCode] Problem 566 - Reshape the Matrix

Posted on 2019-09-17 | In Algorithm , LeetCode
In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its original data. ...
Read more »

[LeetCode] Problem 532 - K-diff Pairs in an Array

Posted on 2019-09-17 | In Algorithm , LeetCode
Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an inte ...
Read more »

[LeetCode] Problem 188 - Best Time to Buy and Sell Stock IV

Posted on 2019-09-16 | In Algorithm , LeetCode
Say you have an array for which the i-th element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may compl ...
Read more »

[LeetCode] Problem 123 - Best Time to Buy and Sell Stock III

Posted on 2019-09-16 | In Algorithm , LeetCode
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple ...
Read more »
1…111213…78
mrlonelyjtr

mrlonelyjtr

间歇性踌躇满志,持续性混吃等死

780 posts
18 categories
18 tags
Github
© 2020 mrlonelyjtr
Powered by Hexo
Theme - NexT.Pisces