Tag:The sum

  • Leetcode Weekly – 174 – 3


    1339. Maximum product of split binary trees Hi, everyone. I’m a pig. Welcome to the weekly leetcode quiz of the “baby can understand” series. This is the third question in 174 and 1339 in the list of topics – “the maximum product of a split binary tree.” Title Description Here is a binary tree whose […]

  • [leetcode 477] PHP calculates the sum of Hamming distances


    Link to the original text: he Xiaodong’s blog PHP calculates the sum of Hamming distances The Hamming distance of two integers refers to the number of different bits corresponding to the binary number of the two numbers. Calculate the sum of Hamming distances between any two numbers in an array. Example: Input: 4, 14, 2 […]

  • C practical exercises 45


    Title:Learn how to use register to define variables. Program analysis:None. example: #include int main() { register int i; int tmp=0; for(i=1;i<=100;i++) tmp+=i; Printf (“sum is% D, TMP)”; return 0; } The output results of the above examples are as follows: The total is 5050 Thank you for your reading, please feel with your heart! Hope […]

  • leetcode477. Total Hamming Distance


    Topic requirements The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the total Hamming distance between all pairs of the given numbers. Example: Input: 4, 14, 2 Output: 6 Explanation: In binary representation, the 4 is 0100, 14 is 1110, […]

  • 64. Minimum path sum


    Given a m x n grid with nonnegative integers, find a path from the top left corner to the bottom right corner, so that the sum of the numbers on the path is the minimum. Note: you can only move down or to the right one step at a time. Example: Input:[  [1,3,1], [1,5,1], [4,2,1]]Output: […]

  • [develop on nervos CKB] Introduction to script programming of nervos CKB [3]: Custom token


    Original author: XuejieOriginal link: https://xuejie.space/2019 Introduction to nervos CKB scripting [3]: Custom tokens CKB’s cell model and VM support many new use cases. However, this does not mean that we need to abandon everything we have. A common use in blockchain today is for token publishers to publish new tokens with special purpose / significance. […]