[daily real topic, preparing for blue bridge Java] straight line + path
Written at the beginning: The Blue Bridge Cup is coming. The countdown is 36 days! Do (learn the real problem + understand the real problem + be able to do the real problem + summarize the real problem) While (time! = 0) April showers bring May flowers. Strive to rush out of the provincial competition, come on!
Today, we bring the personal s ...
Posted by RottenBananas on Sat, 05 Mar 2022 04:13:15 +0100
day18: File (construction method, creating and deleting files or folders, judgment, renaming and cutting, availability, filtering), recursion (traversing folder files)
I. review
1.HashMap set
Features:
A. the data structure is also a Hash table structure
B. It is unsafe in multithreading
C. the initialization capacity of the default array is 16
2. Comparison between HashMap and HashSet
The same point: they are stored in hash table structure
Differences:
The bottom layer of A.HashSet is imp ...
Posted by Ryan Sanders on Sat, 05 Mar 2022 02:13:27 +0100
Data structure and algorithm linear table
Linear table
Definition of linear table:
A finite sequence consisting of n(n ≥ 0) data elements (a1,a2,..., an).Record as: L=(a1,a2,..., an) ai-1 is the direct precursor of ai, and ai+1 is the direct successor of ai a1 - first element - it has no precursor an -- tail element - it has no successorTable length: the number of elements in a li ...
Posted by Bobulous on Sat, 05 Mar 2022 01:22:48 +0100
7-2 Huffman coding and decoding (25 points) (c language)
@Sparks
2022-03-05
Data structure experiment of gxust
subject
Write a Huffman coding and decoding program.
Each word frequency is coded according to the order of Huffman's word frequency, and each word frequency is given from Huffman's word frequency to Huffman's word frequency.
In order to ensure the uniqueness of the constructed Hu ...
Posted by SouThPaw09 on Fri, 04 Mar 2022 23:56:37 +0100
Simple implementation of dictionary tree, prefix tree and Trie tree [insert, search and find prefix]
Simple implementation of dictionary tree, prefix tree and Trie tree [insert, search and find prefix]
1.Trie tree
Trie tree, namely prefix tree, also known as word lookup tree and dictionary tree, is a tree structure and a variant of hash tree. The typical application is to count and sort a large number of strings (but not limited to strings), ...
Posted by Courbois on Fri, 04 Mar 2022 21:07:43 +0100
Daily leetcode - 4 Find the median of two positively ordered arrays
subjectGive two positively ordered (from small to large) arrays of size m and n, \\\\\\\\. Please find and return the median of these two positive arrays.The time complexity of the algorithm should be O(log (m+n)).Input: nums1 = [1,3], nums2 = [2]
Output: 2.00000
Explanation: merge arrays = [1,2,3] ,Median 2
Input: nums1 = [1,2], nums2 = [3, ...
Posted by Blue Blood on Fri, 04 Mar 2022 19:55:35 +0100
Chapter 2 - sequence table of linear table
1, Definition and basic operation of linear table
1. Definition of linear table
2. Basic operation of linear table
"Bring it back" explanation:
x=1 is passed in the main function, but it is changed to 1024 in the test function. In fact, another x is equal to 1024 in the memory. When it is output again in the main funct ...
Posted by fugix on Fri, 04 Mar 2022 17:48:36 +0100
[falling in love with data structures and algorithms Season 2] [04] Figure - basic implementation_ Traversal_ Topological sorting
Continuous learning & continuous updating
Learning attitude: down to earth
The traditional adjacency matrix or adjacency table is not used in the code implementation diagram, because they are too complex and troublesome. The code implementation adopts a compromise scheme, which is more inclined to the adjacency table.
When ...
Posted by firedrop84 on Fri, 04 Mar 2022 12:27:07 +0100
C language programming problem
C language programming problem
Assignment of production practice (curriculum design) Fundamentals of subject or task programming (C) week 2 Professional computer science class level 21 related professional classes Instructor Chen Huafeng, Hu Meiyan, Graduate Teaching Assistant Internship tasks and objectives Through this training, master the ...
Posted by xoligy on Fri, 04 Mar 2022 11:58:16 +0100
Binary tree data structure
Binary tree data structure
A tree whose element has at most 2 children is called a binary tree. Because each element in a binary tree can only have two children, we usually name them left and right children.
The binary tree node contains the following parts.
dataPointer to left childPointer to the right child
Binary tree includes:
Full bi ...
Posted by phorman on Fri, 04 Mar 2022 11:57:41 +0100