The way of Java learning - Set interface, HashSet interface implementation class (important)
Work hard and see you at the top! come on.
1, Set interface
1. Introduction to set interface
Out of order (the order of addition and extraction is inconsistent) and there is no indexDuplicate elements are not allowed and contain at most one null
2. Traversal mode
iterator Enhanced for loop (the underlying is also an iterator)Cannot g ...
Posted by bnownlater on Fri, 24 Sep 2021 08:13:08 -0700
C + + implementation calculator
1, Experimental objects
1. Master stack operation and application;
2. Understand the robustness of the algorithm;
2, Experimental contents
1. Implement lp, rp and operate functions in calculator class;
2. Improve the evaluate function of calculator class and increase the legitimacy check of input, including filtering out all illegal inputs ...
Posted by dashti on Fri, 24 Sep 2021 06:55:41 -0700
430. Flat multi-level bidirectional linked list
time
September 24, 2021
subject
In the multi-level bidirectional linked list, in addition to the pointer to the next node and the previous node, it also has a sub linked list pointer, which may point to a separate bidirectional linked list. These sub lists may also have one or more of their own sub items, and so on to generate multi-level da ...
Posted by kneifelspy on Fri, 24 Sep 2021 02:43:47 -0700
Eight sorting (detailed analysis + dynamic diagram demonstration)
Direct insert sort
Dynamic diagram demonstration: Basic idea:
Insert the records to be sorted into an ordered sequence one by one according to the size of their key values, until all records are inserted into the sequence A new ordered sequence is obtained.
Code implementation:
void InsertSort(int* a, int n)
{
for (int i = 0; i < ...
Posted by GreyFilm on Fri, 24 Sep 2021 02:32:10 -0700
python | bidirectional linked list
brief introduction
From: Easy to understand and explain linked list One way linked list:
Bidirectional linked list: Look at the picture and understand...
Bidirectional linked list data structure
From: Data structure - bidirectional linked list (Python Implementation) Data structure has always been a very important part in the programm ...
Posted by dey.souvik007 on Fri, 24 Sep 2021 02:12:52 -0700
Algorithm problem solving (Leetcode 33, 34, 39, 42, 46)
33. Search rotation sort array - medium - 9 / 17
33. Search rotation sort array - medium
The integer array nums is arranged in ascending order, and the values in the array are different from each other.
Before passing to the function, Num rotates on a previously unknown subscript k (0 < = k < num.length), making the array [num [k], ...
Posted by F1Fan on Fri, 24 Sep 2021 00:47:47 -0700
Binary sort tree
Binary sort tree
1, Definition
Binary Sort Tree, also known as binary search tree. It is either an empty tree or a binary tree with the following properties.
1. If its left subtree is not empty, the values of all nodes on the left subtree are less than the values of its root node. 2. If its right subtree is not empty, the values of all nodes ...
Posted by muppet on Thu, 23 Sep 2021 04:43:25 -0700
Selection sorting and insertion sorting and comparison - sorting - algorithm version 4
1, Select sort
1. Algorithm description
First, find the smallest element in the arraySecond, it interacts with the first element of the arrayAgain, find the smallest element in the remaining array elements and interact it with the second element of the arrayRepeat until the entire array is sorted
2. Analysis
Compare elements: compare th ...
Posted by kbaker on Thu, 23 Sep 2021 03:47:57 -0700
[2021-9-23] supplementary question record
Educational Codeforces Round 54 (Rated for Div. 2) E. Vasya and a Tree Main idea of the topic: given a tree with 1 as the root node, each node value is 0, given several modifications, x,d,v, is the y value of X node and its dist (x, y) < = D, plus v, and finally outputs the value of each node; Solution: for offline modification, use the tree ...
Posted by daniel_lee_hill on Thu, 23 Sep 2021 01:05:23 -0700
HDU1232 unblocked project and collection query introduction classic OJ problem solution
1, Background introduction
This is the classic example of parallel search set, and the entry level. If you want to learn this data structure, you must learn this foundation well. You can recite the template. The title source is HDU 1232, and the specific link is: http://acm.hdu.edu.cn/showproblem.php?pid=1232.
2, Title Description
Probl ...
Posted by kelseyirene on Wed, 22 Sep 2021 21:53:28 -0700