Java foundation - Collections (List, Set, Map) and Collections tool classes in Java (a fine summary of more than 10000 words)

Collections in Java Overview of the collection framework 1. Collections and arrays are structures that store multiple data, referred to as Java containers for short Note: storage at this time only refers to memory level storage, and does not involve persistent storage 2. Array features in storing multiple data: Once initialized, its length ...

Added by matanoosh on Sun, 09 Jan 2022 07:48:17 +0200

python advanced algorithm and data structure: fast query and merging of collections

In code design, we often face such scenarios. Given two elements, we need to quickly judge whether they belong to the same set, and different sets can be quickly combined into one set when necessary. For example, if we want to develop a social application, we need to judge whether the two users are friends, Or whether they belong to the same gr ...

Added by califdon on Sun, 09 Jan 2022 06:34:04 +0200

HENAU string theme

Item A similarity detection B - initial capital C case conversion D digital inversion E - delete word suffix F - judge whether the string is palindrome G - basic data structure - stack (1) H - dictionary order I - verify substring J - substring lookup K - cut cloth strip L - longest palindrome substring Item A similarity detection ...

Added by DaRkZeAlOt on Sun, 09 Jan 2022 06:22:43 +0200

Several ways of traversing the first, middle and last order of Java ~ binary tree (recursive method, iterative method, marking method, etc.) are clear and easy to understand, including complete code

catalogue I Definition of nodes II Traversing binary tree by recursive method Preorder traversal Medium order traversal Postorder traversal III Iterative (non recursive) traversal of binary trees (1). Iterative simulation method Preorder traversal Medium order traversal Postorder traversal (2). Null pointer notation Preorder travers ...

Added by SystemWisdom on Sun, 09 Jan 2022 05:11:40 +0200

java implementation and understanding of seven sorting

Insert sort 1. Insert sorting directly Moving picture transfer gate. Thought: when playing poker, uncover the cards one by one and find the insertion position from back to front, so that the cards in your hand are always in an orderly state // 1. Direct insertion public static void insertSort(int[] array) { // 1. Uncover the cards on ...

Added by kasitzboym on Sun, 09 Jan 2022 04:13:50 +0200

Divide and conquer thought-merge sort-invert ordinal number

The Idea of Dividing and Treating Score - break down the problem into smaller subproblems; Fix - Fix these smaller subproblems one by one; Combine - Combine the solved sub-problems to get the solution of the "mother" problem. Merge Sort If there is an array A[0...n] Break up the array until there are only two elements left Merging ...

Added by flyankur on Sat, 08 Jan 2022 19:43:07 +0200

Deep analysis of the principle of Bloom filter

In 1970, bloom filter was proposed to judge whether an element is not in a set, but it can not accurately determine whether the element is in the set. Generally, to determine whether an element exists in the set of a business scenario, it is generally to save the element in the set and then determine it through comparison. For example, dat ...

Added by habbardone on Sat, 08 Jan 2022 18:28:02 +0200

Stack and queue

stack definition Stack is a last in first out (LIFO) data structure. In the push down stack, only two operations are allowed: push the object into the stack and pop the object from the stack. Elements can only be added and deleted at the top of the stack. Push adds the object to the top of the stack, and pop removes the object from the top. A ...

Added by paulspoon on Sat, 08 Jan 2022 11:26:44 +0200

[PAT (Basic Level) Practice] - [find element] 1028

I. [Topic difficulty] Class B II. [Title No.] 1028 census (20 points) III. [Title Description] A census was conducted in a town and the birthdays of all residents were obtained. Now please write a program to find out the oldest and youngest people in the town.Here, ensure that each entered date is legal, but not necessarily reasonable ...

Added by phprocker on Sat, 08 Jan 2022 11:17:34 +0200

Data structure - linear list - linked storage structure, static linked list (Java, C language)

This article follows the previous article. We learned about the sequential storage structure of linear tables. In this article, we learn about the chain storage structure of linear tables and compare the advantages and disadvantages of the two storage structures. 1, Lack of sequential storage structure Although the sequential storage struc ...

Added by Static_Nexus on Sat, 08 Jan 2022 11:02:40 +0200