mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[Leetcode] Problem 1218 - Longest Arithmetic Subsequence of Given Difference

Posted on 2020-10-30 | In Algorithm , LeetCode
Given an integer array arr and an integer difference, return the length of the longest subsequence in arr which is an arithmetic sequence such that th ...
Read more »

[Leetcode] Problem 1124 - Longest Well-Performing Interval

Posted on 2020-10-29 | In Algorithm , LeetCode
We are given hours, a list of the number of hours worked per day for a given employee. A day is considered to be a tiring day if and only if the numbe ...
Read more »

[Leetcode] Problem 1631 - Path With Minimum Effort

Posted on 2020-10-28 | In Algorithm , LeetCode
You are a hiker preparing for an upcoming hike. You are given heights, a 2D array of size rows x columns, where heights[row][col] represents the heigh ...
Read more »

[Leetcode] Problem 1508 - Range Sum of Sorted Subarray Sums

Posted on 2020-10-27 | In Algorithm , LeetCode
Given the array nums consisting of n positive integers. You computed the sum of all non-empty continous subarrays from the array and then sort them in ...
Read more »

[Leetcode] Problem 1442 - Count Triplets That Can Form Two Arrays of Equal XOR

Posted on 2020-10-26 | In Algorithm , LeetCode
Given an array of integers arr. We want to select three indices i, j and k where (0 <= i < j <= k < arr.length). Let’s define a and b as f ...
Read more »

[Leetcode] Problem 1438 - Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit

Posted on 2020-10-25 | In Algorithm , LeetCode
Given an array of integers nums and an integer limit, return the size of the longest non-empty subarray such that the absolute difference between any ...
Read more »

[Leetcode] Problem 460 - LFU Cache

Posted on 2020-10-22 | In Algorithm , LeetCode
Design and implement a data structure for Least Frequently Used (LFU) cache. Implement the LFUCache class: LFUCache(int capacity) Initializes the obj ...
Read more »

[Leetcode] Problem 381 - Insert Delete GetRandom O(1) - Duplicates allowed

Posted on 2020-10-21 | In Algorithm , LeetCode
Design a data structure that supports all following operations in average O(1) time. insert(val): Inserts an item val to the collection. remove(val): ...
Read more »

[Leetcode] Problem 380 - Insert Delete GetRandom O(1)

Posted on 2020-10-20 | In Algorithm , LeetCode
Implement the RandomizedSet class: bool insert(int val) Inserts an item val into the set if not present. Returns true if the item was not present, fa ...
Read more »

[Leetcode] Problem 432 - All O'one Data Structure

Posted on 2020-10-19 | In Algorithm , LeetCode
Implement a data structure supporting the following operations: Inc(Key) - Inserts a new key with value 1. Or increments an existing key by 1. Key is ...
Read more »
123…78
mrlonelyjtr

mrlonelyjtr

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

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