Generics of Java advanced features

What is generics As a literal meaning, a generalized type means that a specific type cannot be determined during encoding. A placeholder (uppercase, English is recommended) needs to be used first. When running, a specific type is passed in to replace this generic tag Why do I need generics Pseudo demand Suppose we need a list to store Strin ...

Added by -Karl- on Mon, 20 Dec 2021 10:42:45 +0200

[learning 100 million points every day] - OJ questions of stack and queue

1. Implement stack with queue graphic Since two queues are used to implement the stack, it must be related to the nature of the queue. It must be changed back and forth. Let's take a look at this process. code implementation typedef struct { Queue* q1; Queue* q2; } MyStack; /** Initialize your data structure here. */ M ...

Added by jstarkey on Mon, 20 Dec 2021 06:19:59 +0200

Data Structure - [Implement Balanced Tree]

Write before In fact, you've updated a note about the balanced tree before;-> Note links; Learn Data Structure Notes (12) [Balanced Binary Search Tree (AVLTREE)] The previous implementation required the index of the parent node of the current node to be calculated;... The steps for the implementation of left-handed and right-handed are ...

Added by networkguy on Mon, 20 Dec 2021 05:51:29 +0200

Universal search - 2 Save xiaoha

2. Save xiaoha Task: The maze consists of n rows and m columns of cells (n and m are less than or equal to 50), and each cell is either an open space or an obstacle. The task is to help Xiao hum find the shortest path from the beginning of the maze to Xiao ha's location. Pay attention to the obstacles. Of course, Xiao hum can't go out of the ...

Added by MikeFairbrother on Sun, 19 Dec 2021 21:50:42 +0200

[C + + from bronze to king] Part 20: a preliminary understanding of set, map, multiset and multimap of STL

Catalogue of series articles preface 1, Associative container In the initial stage, we have touched some containers in STL, such as vector, list, deque and forward_list(C++11), etc. these containers are collectively referred to as sequential containers, because their bottom layer is a linear sequence data structure, in which th ...

Added by Rigo on Sun, 19 Dec 2021 20:57:39 +0200

JavaScript data structure and algorithm

JavaScript data structure and algorithm (Part 2) In the last article, we learned a lot of data structures, including stack, queue, dictionary, linked list and so on. I hope you can absorb them one by one and we will make progress together. In this article, we will explore the mysteries of trees and graphs, and I will introduce several algorith ...

Added by zypher11 on Sun, 19 Dec 2021 17:50:43 +0200

Comprehensive graphic quick sort

Write before: Hello, I'm time. What we bring today is the quick sort in the sorting algorithm. I explained it graphically and tried to write it thoroughly. Don't say much, let's go! Mind map: 1. Quick sort concept The records to be arranged are separated into two independent parts by one-time sorting. If the keywords of one part of ...

Added by StewardManscat on Sun, 19 Dec 2021 16:37:36 +0200

Data structure (lookup, Hash table)

How search works Find concepts Let the record table L = (R1,R2,R3... Rn), where R (1 < = I < = n) is the record. For a given value k, the process of determining the record with key=k in Table L is called search.If there is a record Ri with key=k in the table, it is recorded as Ri key=k, the search succeeds, and the sequence number i (or ...

Added by curtm on Sun, 19 Dec 2021 15:49:00 +0200

[data structure Java version] sequence table

1, Linear table A linear table is a finite sequence of n data elements with the same characteristics. Common linear tables are: Sequential list, linked list, stack, queue, string The logic of a linear table is a linear structure, that is, a continuous line. However, the physical structure is not necessarily continuous. When a linea ...

Added by cmanhatton on Sun, 19 Dec 2021 08:39:48 +0200

Learning notes on data structure and algorithm -- circular linked list and bidirectional linked list

Data structure and algorithm learning notes (C language) Circular linked list 1. Definition: circular linked list is another form of linked storage structure. Its feature is that the pointer field of the last node in the table points to the head node, and the whole linked list forms a ring. If the circular linked list is an empty list, the ne ...

Added by hasek522 on Sun, 19 Dec 2021 05:56:20 +0200