The interviewer asked me to go back and look at the first question.

⭐ Introduction ⭐ Neodymium Hi everyone, I'm stuck. Today we are explaining the series of classical sums. It's good to say that some people can't do the first thing while watching the sea at night. You should all know that the first question of power button is the sum of two numbers. But in fact, the sum of two numbers is only the beginning. In ...

Posted by greatepier on Thu, 30 Dec 2021 23:03:46 +0100

Sliding window -- double pointer idea with the same direction

The general idea is as follows: Given a sequence, define two pointers left and right, and define the measurement index F before the interval [left,right], such as interval sum, product and others according to the meaning of the question. At the beginning, left=right=0, calculate the index F. left remains unchanged first, right moves to the rig ...

Posted by sidney on Mon, 20 Dec 2021 23:26:00 +0100

LeetCode brush notes double pointer sliding window

sliding window Sliding window: if two pointers point to the same linear table, the traversal direction is the same, and the starting points of the two pointers are different, a sliding window will be formed. The two pointers move with different strategies until the values of the two pointers are equal or meet other special conditions. 76 mini ...

Posted by yoda69 on Sun, 05 Dec 2021 06:37:06 +0100

Double pointer algorithm

preface After listening to one of the basic algorithm classes held by yxc in acwing and listening to the double pointer algorithm, I feel that in fact it is still a violent method, but after analysis, it is actually an O(n) algorithm. I can't help but be a little curious. At the beginning, I didn't understand it. I always feel that it still has ...

Posted by pacome on Sat, 04 Dec 2021 22:44:41 +0100