• Tree array summary


    Tree array summary preface In the past three weeks, I mainly reviewed the line segment tree and tree array.However, the line segment tree can’t write after a black problem of pressure position collapses. On a whim, I decided to write a summary of the review content during this period.The konjaku has limited strength. Please understand […]

  • PAT 1086 Tree Traversals Again


    1086tree traversals again (25 points) An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the stack operations are: push(1); push(2); push(3); pop(); pop(); push(4); pop(); pop(); push(5); push(6); pop(); pop(). […]

  • Leetcode practice – bit operation (division of two numbers, numbers that appear only once, repeated DNA sequences, etc.)


    preface The operation of 0 and 1 is the bottom operation of the computer. All programs, no matter what language they are written in, must be transformed into a language that the machine can understand, that is, binary for basic operations, and these basic operations are the bit operations we want to talk about today. […]