Summary of java HashMap theory

catalogue Introduction to HashMap differences from other containers Introduction to HashMap The difference between HashMap and Hashtable Different parent class Null value problem Thread safety Different traversal modes Different initial capacity Hash values are calculated differently Differences between HashMap and HashSet Difference ...

Added by jboy6t9 on Wed, 12 Jan 2022 23:16:11 +0200

Data Structure Chapter II Linear Tables

Linear Table 1. Definition of Linear Table A linear table is a finite sequence of n(n < 0) data elements of the same data type, where n is the table length, and a linear table is an empty table when n=0. If a linear table is named L, it is generally expressed as L = ...

Added by niclarke on Wed, 12 Jan 2022 19:21:29 +0200

Various basic operations of headless node and headless node in single linked list (complete code)

The foundation is weak and the understanding is still shallow. If there are mistakes, please correct them. Linear list single chain list (Ⅲ) Various basic operations of headless node and headless node in single linked list (complete code) Node with head #include<stdio.h> #include<malloc. h> / / this header file is required when o ...

Added by PartyMarty on Wed, 12 Jan 2022 11:20:32 +0200

Indexing principle and slow query optimization

Indexing principle and slow query optimization 1. What is an index? Index is a data structure in the storage engine, or the organization of data, also known as key. It is a data structure used by the storage engine to quickly find records. Building an index for data is like building a directory for a book, or creating a phonetic order ...

Added by lives4him06 on Wed, 12 Jan 2022 08:49:58 +0200

Prepare for the second test, three questions a day, Day05

Prepare for the second test, three questions a day Topic 1: incremental ternary subsequence (leetcode 1.12 daily) Give you an integer array nums to judge whether there is an increasing subsequence with length of 3 in this array. If such a triple subscript (i, j, k) exists and I < J < K is satisfied, so that num [i] < num [J] < nu ...

Added by prestonwinfrey on Wed, 12 Jan 2022 07:09:56 +0200

Binary sort tree code implementation

1. Analyze the characteristics of elements in binary sort tree The binary sort tree must ensure that the elements can be compared in size How to ensure that elements can be compared in size? Implement comparator interface - implement the Comparable interface and rewrite the compareTo method -- internal comparator - implement Comparator int ...

Added by Res on Tue, 11 Jan 2022 16:59:15 +0200

[design mode] 6-10: decorator mode, agent mode, factory mode, prototype mode, template method mode

Chapter VI decorator mode The behavior of class or its algorithm can be changed at run time, which belongs to behavioral mode Application: different implementation classes have different functions, one policy structure, one context class (interface parameters) and n interface implementation classes public class StrategyPatternDemo { public ...

Added by asterinex on Tue, 11 Jan 2022 04:59:59 +0200

HashMap core knowledge - deep learning

HashMap first appeared in JDK 1.2, and the underlying implementation is based on hash algorithm. HashMap allows null keys and null values. When calculating the hash value of HA key, the hash value of null key is 0. HashMap does not guarantee the order of key value pairs, which means that the order of key value pairs may change after some operat ...

Added by OnePlus on Tue, 11 Jan 2022 02:07:15 +0200

Leetcode.863. Enhancement of all K-distant nodes in a binary tree --- Further understanding of tree width, recursive reverse node finding, and function

0. Preface The brushing algorithm clocked in for the sixth day and today picked up a moderate problem. But with the precipitation knowledge of the previous problem solving, it doesn't feel too painful to solve today. But there is something new to settle, so this is a record. That's how the brushing algorithm works. It's okay in general ...

Added by krishnam1981 on Mon, 10 Jan 2022 20:04:22 +0200

8 data structure and algorithm

Data structure and algorithm 1. Basic knowledge 1. Relationship between data Logical structure: it refers to the relationship between data elements, which is imagined by us and is not substantially stored in the computer. ​ Linear structure: there is a one-to-one relationship between data elements in a linear structure Tree structure: the ...

Added by zuperxtreme on Mon, 10 Jan 2022 13:09:52 +0200