A solution to double linked list (0 basic view) (C language) data structure and algorithm

catalogue preface Lead two-way circular linked list 1. Concept 2. Effect display diagram 3. Interface implementation 3.01. The interface to be implemented in this article ​3.02. Implementation of double linked list 3.03. Initialization of double linked list 3.04. Print linked list 3.05. Dynamically apply for a node 3.06. Head ins ...

Added by tbaink2000 on Sat, 15 Jan 2022 12:29:43 +0200

Data structure - stack and queue - (and water-water Internship)

1, Stack 1. Basic usage class Stack: def __init__(self): self.stack = [] # Push def push(self,element): self.stack.append(element) # Out of stack def pop(self): if len(self.stack) > 0: return self.stack.pop() else: return None def get_top(self): if le ...

Added by dhcrusoe on Sat, 15 Jan 2022 11:08:52 +0200

Segment trees: maximum

Title Link: https://www.luogu.com.cn/problem/P1198 Title: Title Description Now you are requested to maintain a sequence. The following two operations are required: 1. Query operation. Syntax: Q L Function: query the maximum number of the last L numbers in the current sequence, and output the value of this number. Limit: l does n ...

Added by giovo on Sat, 15 Jan 2022 04:04:24 +0200

Code Capriccio record: array

preface I use it to record the title of the book written by the boss of my brush code Capriccio (that is, Carl). If there is a self search code Capriccio that I want to learn together, I can. This is an array. The number at the beginning of the title is the serial number of the title in LeetCode. Array article 704. Binary search: This is ...

Added by ishboo on Sat, 15 Jan 2022 01:01:27 +0200

Wang Dao exercises in section 2.23 of data structure

Bibliography: 2022 data structure review guide for postgraduate entrance examination organized by Kingway Forum 1. Delete the element with the minimum value from the sequence table (assuming unique) and return the value of the deleted element by the function. The empty position is filled by the last element. If the sequence table is empty, an ...

Added by zalath on Fri, 14 Jan 2022 23:46:08 +0200

Data structure and algorithm

Notes: Queue: (offer, poll, element) A queue is a linear table that only allows insertion at one end and deletion at the other end. ——We call the end that is allowed to be deleted as the front and the end that is inserted as the rear ——A queue without any data elements is called an empty queue ——Queue is ...

Added by tat on Fri, 14 Jan 2022 21:14:59 +0200

Common methods of Collection interface and Map interface

1, The methods of the Collection interface are: boolean add(E e) This method adds an element to the collection. E represents generics (that is, the data type is determined when the object is created). The return value is a boolean value. When the addition is successful, it returns true, but this return value is generally not received. Colle ...

Added by php_dev_101 on Fri, 14 Jan 2022 20:36:32 +0200

Java data structure and algorithm - queue (detailed implementation)

preface The content of this article is the summary and supplement of the scattered notes I made when learning the data structure. It is inevitable that there are defects in the sorting process. If you find any errors, please point them out in time. Thank you! Part I - > Basic concepts and understanding Part II ---- > algorithm Part III - ...

Added by Avochelm on Fri, 14 Jan 2022 19:15:28 +0200

Data structure - dynamic array

  catalogue 1 dynamic array 1.1 double ended stack 1.1.1 definition of double ended stack           1.1.2 arraydoubleendstack class 1.2 queue          1.2.1 definition of queue 1.2.2 definition of queue interface 1.2.3} ArrayQueue class 1.3 queue implementation stack 1.3.1 quetostack class 1.4 circular queue ArrayLoopQueue 1.4.1 de ...

Added by sheen.andola on Fri, 14 Jan 2022 18:01:33 +0200

The top ten sorting of data structure (Zuo Cheng Yun Zuo Shen version) is continuously updated

This is the sorting algorithm I learned in the video of the latest left God data structure algorithm on station b 2021. I feel very good Here to share with you 1. Select Sorting 1.1 idea of selecting sorting Refer to the figure drawn by Zuo Shen: (1) Traverse the array from the beginning (subscript 0 position), find the minimum value, and ...

Added by emehrkay on Fri, 14 Jan 2022 16:50:48 +0200