[Java -- data structure] queue

catalogue 1, Queue 🧊 Concept of queue 🧊 Terminology of queues 2, Normal queue 🧊 Queue method 🧊 Use of methods 🧊 Simulate the implementation of ordinary queue 3, Circular queue 🧊 Introduction to circular queue 🧊 Array subscript loop technique 🧊 Cyclic queue diagram 🧊 How to distinguish whether the circular queue is full or e ...

Posted by Amitk on Sat, 09 Apr 2022 19:16:28 +0300

top101 binary tree of Niuke network (pre order traversal, middle order traversal, post order traversal)

Preorder traversal What is the preorder traversal of a binary tree? In short, it is "root left and right". In expansion, it is to give priority to accessing the root node of a binary tree, then access its left subtree, and then access its right subtree after all the left subtrees are accessed. For the subtree, follow the previous ac ...

Posted by Nulletz on Sat, 09 Apr 2022 10:08:12 +0300

Basic operation of sequential cyclic queue of data structure (very detailed C language version)

Basic operation of sequential cyclic queue of data structure (very detailed C language version) Write in front: because of the beginner's data structure, if readers find any errors or doubts, they can comment on private letters and communicate together. If they think it's well written, please praise it. Thank you! 1. Remove worries and d ...

Posted by mikeyca on Sat, 09 Apr 2022 09:26:08 +0300

The artifact SpringDoc was born, and the API documentation tool most suitable for SpringBoot is here

The Swagger library provided by SpringFox has been used in the SpringBoot project before. After going up and down the official website, I found that there has been no new version for nearly two years! SpringBoot 2.6 was upgraded a few days ago In version x, it is found that the compatibility of this library is getting worse and worse. Some comm ...

Posted by sam_rich on Fri, 08 Apr 2022 16:19:40 +0300

Weekly leetcode - 04 array 912~402~offer 50~offer 75~316~1081

leetcode - 912. Sort array (merge sort) Give you an integer array nums, please arrange the array in ascending order. class Solution { public static void main(String[] args) { int[] arr = {-3,1,2,3,4,5,6,10}; sortArray(arr); for(int i=0;i<arr.length;i++){ System.out.println(arr[i]); } ...

Posted by Woodburn2006 on Fri, 08 Apr 2022 08:04:31 +0300

And search the set, quickly find and quickly merge

Basis of parallel search 1, Concept and introduction Join query set is a tree data structure, which is used to deal with the merging and query of some disjoint sets. The idea of parallel search set is to use an array to represent the whole forest (parent). The root node of the tree uniquely identifies a set. As long as we find the tree root ...

Posted by Skilo on Fri, 08 Apr 2022 07:45:00 +0300

Eight sorting algorithms

I Select sort The logic of selecting sorting is very simple, that is, loop through all the data that has not been sorted, and then take out the largest or smallest data in each round of loop and put it at the end of the sorted sequence. It is very stable because it will not apply for additional space, so the space complexity is O(1). The algo ...

Posted by mike16889 on Fri, 08 Apr 2022 05:12:51 +0300

The 9th Blue Bridge Cup Java provincial competition

A. What day Title Description: Title Description January 1, 2000 is the first day of that year. So, May 4, 2000, is the first day of that year? Output format Output an integer to represent the answer Train of thought analysis: 2000 is a leap year (366 days). The way to judge the normal year of leap year is: it can be divided b ...

Posted by thunderdogg on Thu, 07 Apr 2022 18:03:07 +0300

Rope cutting + horse traversal + missile interception [Luogu]

⚡ ⒋ 1 horse traversal - BFS Traversal of horses 1.1 problem solving ideas This question is the standard bfs (breadth first search) template question type. If you know how to do maze problems, this question is not difficult. The difference is that there are 8 positions to choose in the next step. 1.2 code pasting #include<bits/stdc ...

Posted by dzelenika on Thu, 07 Apr 2022 08:51:07 +0300

[MySQL] detailed explanation of creating and managing tables

1. Basic knowledge 1.1 procedure for storing a piece of data Storing data is the first step in processing data. Only by storing the data correctly can we carry out effective processing and analysis. Otherwise, it can only be a mess and there is no way to start. So, how can we store all kinds of complicated data related to users' busines ...

Posted by carolin on Thu, 07 Apr 2022 06:39:42 +0300