Expression evaluation based on binary tree (C + +, detailed idea)

describe Enter an expression (the numbers in the expression are positive integers less than 10), use a binary tree to represent the expression, create an expression tree, and then use the traversal operation of the binary tree to find the value of the expression. input Multiple sets of data. Each row ...

Posted by tejama on Tue, 30 Nov 2021 14:23:22 -0800

[data structure] dynamic sequence table

1, Data structure Preface 1. Data structure: data and organization between data 2. Program (data and function composition) = data structure + algorithm 3. Time complexity Concept: the number of execution times of a statement of an algorithm program (rather than the running time of the algorithm); Time complexity is a function T ...

Posted by Goat on Tue, 30 Nov 2021 08:11:27 -0800

Overview of Chapter 1 of data structure C + + language description

1, Overview We regard each data structure as an abstract data type. It not only defines the organization of data, but also gives the operations to process data. In C + + language, classes are used to represent abstract data types, and objects are used to store and process data in specific applications. The creation of C + + classes is the ba ...

Posted by Joel.DNSVault on Tue, 30 Nov 2021 06:37:18 -0800

Poj1509 glass beads [suffix array or suffix automata SAM]

Portal analysis Minimum cyclic string problem Given a string S S S. Each time, you can move its first character to the back to find the string with the smallest dictionary order. T T ...

Posted by g0liatH on Tue, 30 Nov 2021 05:53:13 -0800

Experimental instruction for data structure and algorithm R (2020)

preface: LPT inner roll: Brush questions every day Experiment 1 linear table 1. Let the data elements in sequence table A increase in order, try to write A program to insert x into the appropriate position of the sequence table so that the table is still orderly. #include<stdio.h> #include<stdlib.h> #define LIST_INIT_SIZE 100 ...

Posted by sgtpepper on Tue, 30 Nov 2021 05:01:39 -0800

LeetCode notes (C language version, September)

Day Practise - 3 problems one day 2021.9.16 1 - 3 2021.9.17 4 - 6 2021.9.18 7 - 9 2021.9.19 10 - 12 2021.9.20 13 - 15 2021.9.21 16 - 18 2021.9.22 19 - 21 3h 2021.9.23 22 - 24 2h 2021.9.24 25 - 27 1h40m 2021.9.25 28 - 30 1h8m 2021.9.26 31 - 33 1h28m 2021.9.27 34 - 36 34m 2021.9.28 37 - 39 2h10m 40 - 1h4 ...

Posted by jauson on Tue, 30 Nov 2021 03:53:26 -0800

CSP tree in front of the school gate

Preliminary ideas: Preprocess the prime number array [68] within 340 (because if the number greater than 340 is a composite number, it must be divided by the number within 340 (if not, it must be greater than 1e5). Then judge to decompose the prime factor. Just remove the prime number array one by one. Finally, if it is not 1, it will be the l ...

Posted by hmvrulz on Tue, 30 Nov 2021 03:32:35 -0800

PKU data structure and algorithm -- external sorting

Computer memory External memory characteristics Advantages: permanent storage capacity, portability Disadvantages: long access time Principle: minimize the number of accesses to external memory External memory data access mode It is divided into two stages: location and access External memory is divided into fixed length storage space ...

Posted by philwong on Mon, 29 Nov 2021 22:00:39 -0800

In depth understanding of computer systems (Third Edition) - Chapter 6 - cache lab

The experiment in this chapter is quite interesting. Simply record the practice. 1, partA partA is relatively simple. It should be noted that the use of LRU and different lines in the same set do not store continuous addresses. Take s = 1, E = 2, b = 1 as an example: the first row of the first set stores 0x2 0xa ···, ...

Posted by Ghostgator on Mon, 29 Nov 2021 20:21:47 -0800

07_JavaScript data structure and algorithm bidirectional linked list

JavaScript data structure and algorithm (VII) bidirectional linked list One way linked list and two-way linked list Unidirectional linked list You can only traverse from beginning to end or from end to end (generally from beginning to end).The linked list connection process is one-way. The implementation principle is that there is a referenc ...

Posted by foolguitardude on Mon, 29 Nov 2021 20:13:01 -0800