Leetcode notes: Squares Perfect

The effect of the subject is to give a target integer, the number of complete square to calculate the total number of targets to get the minimum number of integers. A better solution is to use dynamic programming. ...
read(451) comment(0)

Leetcode notes: Bits Reverse

The requirements of the title is relatively simple, enter a 32 bit unsigned integer, according to its binary representation, the output of its binary relative to the unsigned integer. An example is also given. ...
read(369) comment(0)

Leetcode notes: Primes Count

The title has a lot of tips, the effect is to figure out how many prime numbers between 2~n. Ideas from the famous Ella Torsten Ni sieve method. ...
read(404) comment(1)

Leetcode note: of Last Word Length

The effect of the title is to enter a string of characters, the output of the length of the last word. ...
read(329) comment(1)

Leetcode notes: Break Word

If you use recursion, you will be timed out. At this time the use of dynamic programming to solve the problem, the source string s from the beginning to the end, break into the sub strings for the operation, for this kind of string combination problem, need to master the similar state transition equation. ...
read(467) comment(0)

Leetcode notes: Zeroes Move

The meaning of the title is very clear, given an array of non zero elements to adjust to the front, zero elements placed in the back of the array, the required in situ operation and use as little as possible the number of operations. ...
read(541) comment(0)

Personal summary of some of the C/C++ encoding specifications

For different programming languages and specific coding standard can have very different, but the purpose are consistent, is to ensure that the code in the high quality demand also have good readability and maintainability. For example, we can specify the C language program of a project to follow such a rule: the name of the variable, the writing of the header, and the #include, etc.. ...
read(1283) comment(22)

Leetcode notes: Sum Query Range - Mutable

Topics in Sum Query Range - Immutable on the basis of an increase in the difficulty of the request in the input array nums, to modify the elements of the array, each time only one element. Similarly to achieve a certain range of the array and the function of the array. ...
read(463) comment(0)

Leetcode notes: Sum Query Range - Immutable

Given an array of nums, and j to find the elements between the and I, where the assumption that the I must be less than or equal to `j`, and the array of nums is generally the same. ...
read(521) comment(0)

Leetcode note: Two Integers Divide

The meaning of the title is simple and clear, that is not to use the multiplication, division and take more than mod, input two integers, the results of the output division operation. ...
read(423) comment(0)

Leetcode notes: Conversion ZigZag

This problem is the relationship between the elements of the original string and the string after the saw...
read(632) comment(1)

Leetcode note: Median from Data Stream Find

The title of the classic approach is to maintain a maximum heap and a minimum heap. The maximum storage ended the half so far smaller, the minimum heap storage is as of the date the bigger half, so that the median may only is at the top of the stack or two at the top of the stack corresponds to the average number of two value. ...
read(561) comment(1)

Leetcode note: and Cows Bulls

The question is to guess the number (also known as and Cows Bulls) is a probably in the middle of twentieth Century, the rise of the United Kingdom in the middle of the puzzle game. ...
read(591) comment(0)

Leetcode notes: Switcher Bulb

Subject to the effect that there is n only in the closed state of the initial light bulbs. You first turn on all the light bulbs (first round). Then, put out the light bulb with a multiple of 2. The third round, switch to a multiple of 3 of the number of light bulbs (open on the turn off, closed on the open). N round, you only switch the last light bulb. After calculating the N round, there are several light bulbs lit. ...
read(379) comment(0)

Leetcode note: to English Words Integer

The request is very simple, an integer translated into english. According to that we know that digital reading is regular, only 3 bits per treatment can be a translation. In the cycle before, the possible use of the string (0-9, 10-19, 20, 30, 40, 90, etc.) for the classification of English, put in a few arrays, the use of points. Attention to the use of spaces in the accumulation of strings. ...
read(453) comment(0)
215 data a total of 15 pagesOne Two Three Four Five ... Next page Shadowe
    personal data
    • visit258723 times
    • Integral:Five thousand four hundred and forty-nine
    • Grade
    • Rank:2685th name
    • original207
    • Reproduced:7
    • Translation:2
    • Comments:201
    Blog column
    Latest comments