mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[LeetCode] Problem 189 - Rotate Array

Posted on 2019-08-21 | In Algorithm , LeetCode
Given an array, rotate the array to the right by k steps, where k is non-negative. ExampleNo.1Input: [1,2,3,4,5,6,7] and k = 3 Output: [5,6,7,1,2,3,4] ...
Read more »

[LintCode] Problem 607 - Two Sum III - Data structure design

Posted on 2019-08-21 | In Algorithm , LintCode
Design and implement a TwoSum class. It should support the following operations: add and find. add - Add the number to an internal data structure.find ...
Read more »

[LeetCode] Problem 191 - Number of 1 Bits

Posted on 2019-08-21 | In Algorithm , LeetCode
Write a function that takes an unsigned integer and return the number of ‘1’ bits it has (also known as the Hamming weight). ExampleNo.1Input: 0000000 ...
Read more »

[LeetCode] Problem 190 - Reverse Bits

Posted on 2019-08-21 | In Algorithm , LeetCode
Reverse bits of a given 32 bits unsigned integer. ExampleNo.1Input: 00000010100101000001111010011100 Output: 00111001011110000010100101000000 Explanat ...
Read more »

[LeetCode] Problem 172 - Factorial Trailing Zeroes

Posted on 2019-08-21 | In Algorithm , LeetCode
Given an integer n, return the number of trailing zeroes in n!. ExampleNo.1Input: 3 Output: 0 Explanation: 3! = 6, no trailing zero. No.2Input: 5 Outp ...
Read more »

[LeetCode] Problem 160 - Intersection of Two Linked Lists

Posted on 2019-08-21 | In Algorithm , LeetCode
Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to i ...
Read more »

[LeetCode] Problem 1049 - Last Stone Weight II

Posted on 2019-08-21 | In Algorithm , LeetCode
We have a collection of rocks, each rock has a positive integer weight. Each turn, we choose any two rocks and smash them together. Suppose the stone ...
Read more »

[LeetCode] Problem 1046 - Last Stone Weight

Posted on 2019-08-21 | In Algorithm , LeetCode
We have a collection of rocks, each rock has a positive integer weight. Each turn, we choose the two heaviest rocks and smash them together. Suppose ...
Read more »

[LeetCode] Problem 1040 - Moving Stones Until Consecutive II

Posted on 2019-08-20 | In Algorithm , LeetCode
On an infinite number line, the position of the i-th stone is given by stones[i]. Call a stone an endpoint stone if it has the smallest or largest po ...
Read more »

[LeetCode] Problem 1033 - Moving Stones Until Consecutive

Posted on 2019-08-20 | In Algorithm , LeetCode
Three stones are on a number line at positions a, b, and c. Each turn, you pick up a stone at an endpoint (ie., either the lowest or highest position ...
Read more »
1…192021…78
mrlonelyjtr

mrlonelyjtr

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

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