Force chain pen test question -- just look at this one

catalogue 83. Delete the duplicate elements in the ascending linked list so that each element appears only once 82. Delete all nodes with duplicate numbers in the linked list Sword finger offer22 Find the penultimate node in the lin k ed list 876. Find the intermediate node of the linked list. If there are two intermediate nodes, the second ...

Added by brandonr on Mon, 03 Jan 2022 05:32:48 +0200

Stack and queue of data structure

In the next section, let's learn about stacks and queues! (1) Stack It can store operands in sequence and output them in reverse order when necessary! This is the stack! Stack: a linear table with certain operation constraints. It aims to insert and delete one end (top, stack top). (1) The stack implements the first in first out principle ...

Added by ineedhelpbigtime on Mon, 03 Jan 2022 04:59:03 +0200

Implementation and application of treap

Implementation and application of tread concept Tree is a combination of tree+heap. As its name suggests, it has the properties of both heap and binary search tree Each node in the tree has two attributes A A A and B ...

Added by abnfire on Sun, 02 Jan 2022 23:36:15 +0200

Bubble sorting and its optimization

Bubble sorting The size of two adjacent elements is compared. If the current element is larger than the element on the right, it will be exchanged, otherwise it will not be exchanged; A total of N-1 rounds are arranged, and the largest element in the disordered area is selected in each round; A round needs to be compared N-1 times, and there a ...

Added by kyllerj on Sun, 02 Jan 2022 21:31:47 +0200

Data structure training grocery store queuing

Forgive me if there are defects in the first writing 1, Question content The simulator contains multiple queues, which can be simulated using queue arrays. Suppose that the grocery store has five cashier lines, and customers can pay at random. Customers will enter the shortest team. If the team is the same length, choose the nearest team. The ...

Added by evlive on Sun, 02 Jan 2022 20:12:19 +0200

In priority_ Understanding and implementation of container and container adapter under queue

priority_queue By default, the priority queue uses vector as its underlying data storage container, and the heap algorithm is used on the vector to construct the elements in the vector into a heap structure, so priority_queue is the heap. Priority can be considered for all locations where the heap needs to be used_ queue. be care ...

Added by lowspeed on Sun, 02 Jan 2022 19:53:46 +0200

LeetCode brush notes sorting algorithm merge sorting

Introduction to merge sort Algorithm idea: The core idea of merge sort is to use divide and conquer strategy to classify the sort task of the whole array into two sub problems, the first half sort and the second half sort, and then integrate the two ordered parts to complete the overall sort. That is, the array is divided into several subsequ ...

Added by cursed on Sun, 02 Jan 2022 18:51:09 +0200

2021-12-21 data structure final review computer test 4 series

After reflecting on the problems in the first two articles, I found that the knowledge points should be concise and concise Common nouns in strings Empty string: string without any characters, string length = 0 Space string: a string consisting of only one or more spaces Substring: a substring consisting of any consecutive characters ...

Added by edwin_h on Sun, 02 Jan 2022 16:50:39 +0200

Selected force deduction 500 question 72 43 String multiplication [c++/java detailed problem solution]

1. Title Given two nonnegative integers num1 and num2 in string form, return the product of num1 and num2, and their product is also expressed in string form. Example 1: input: num1 = "2", num2 = "3" output: "6" Example 2: input: num1 = "123", num2 = "456" output: "56088" explain: The length of num1 and num2 is less than 110.num1 a ...

Added by Shadow Wolf on Sun, 02 Jan 2022 15:57:58 +0200

Linear tables -- stacks and queues

The column is used to write the basic code definitions and algorithm problems of each data structure, which is convenient for sorting out ideas. The algorithm questions in this article are mainly encountered during personal learning. Because some of them correspond in LeetCode, the question number is attached for reference & only for pers ...

Added by Akito on Sun, 02 Jan 2022 15:26:05 +0200