mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[LeetCode] Problem 981 - Time Based Key-Value Store

Posted on 2019-08-14 | In Algorithm , LeetCode
Create a timebased key-value store class TimeMap, that supports two operations. set(string key, string value, int timestamp) Stores the key and value ...
Read more »

[LeetCode] Problem 911 - Online Election

Posted on 2019-08-14 | In Algorithm , LeetCode
In an election, the i-th vote was cast for persons[i] at time times[i]. Now, we would like to implement the following query function: TopVotedCandidat ...
Read more »

[LeetCode] Problem 744 - Find Smallest Letter Greater Than Target

Posted on 2019-08-14 | In Algorithm , LeetCode
Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in the list t ...
Read more »

[LeetCode] Problem 704 - Binary Search

Posted on 2019-08-14 | In Algorithm , LeetCode
Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, ...
Read more »

[LeetCode] Problem 718 - Maximum Length of Repeated Subarray

Posted on 2019-08-14 | In Algorithm , LeetCode
Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. ExampleInput:A: [1,2,3,2,1]B: [3,2,1,4,7] Outp ...
Read more »

[LeetCode] Problem 454 - 4Sum II

Posted on 2019-08-14 | In Algorithm , LeetCode
Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero. To make pro ...
Read more »

[LeetCode] Problem 885 - Spiral Matrix III

Posted on 2019-08-14 | In Algorithm , LeetCode
On a 2 dimensional grid with R rows and C columns, we start at (r0, c0) facing east. Here, the north-west corner of the grid is at the first row and c ...
Read more »

[LeetCode] Problem 59 - Spiral Matrix II

Posted on 2019-08-14 | In Algorithm , LeetCode
Given a positive integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order. ExampleInput: 3 Output: 12345[ [ 1, 2, 3 ], [ ...
Read more »

[LeetCode] Problem 980 - Unique Paths III

Posted on 2019-08-13 | In Algorithm , LeetCode
On a 2-dimensional grid, there are 4 types of squares: 1 represents the starting square. There is exactly one starting square. 2 represents the endi ...
Read more »

[LeetCode] Problem 419 - Battleships in a Board

Posted on 2019-08-13 | In Algorithm , LeetCode
Given an 2D board, count how many battleships are in it. The battleships are represented with ‘X’s, empty slots are represented with ‘.’s. You may ass ...
Read more »
1…222324…78
mrlonelyjtr

mrlonelyjtr

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

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