Bitmap (Java based implementation)
The so-called bitmap is to use each bit to store a certain state. It is suitable for large-scale data, but there are not many data states. It is usually used to judge whether a data store exists.
Design principle:
Maximize the use of memory as much as possible, and maximize the mining, utilization and performance of Java.
Design idea:
...
Posted by -[ webdreamer ] on Sun, 16 Jan 2022 13:28:57 +0100
LeetCode 04 question - find the median of two positive arrays
LeetCode 04 question - > find the median of two positive arrays
1. Title Description
Find the median of two positively ordered arrays Give two positively ordered (from small to large) arrays nums1 and nums2 of sizes m and N, respectively. Please find and return the median of these two positive arrays. The time complexity of the algorithm ...
Posted by alasxdair on Sun, 16 Jan 2022 12:34:47 +0100
[LeetCode] determine a binary tree
preface
This paper shows the topics related to determining a binary tree in LeetCode, which readers can use to write by dictation to check whether they are familiar with the relevant algorithms. The difficulty is medium.
LeetCode topic Related topic types Related links 105 Constructing binary tree from preorder and inorder traversal sequ ...
Posted by mazman on Sun, 16 Jan 2022 05:50:18 +0100
[matrix continued multiplication] "dynamic programming" -- algorithm design and analysis (Fifth Edition)
1, Algorithm requirements
Given n matrices {A, A, A,,..., An}, where Ai and Ai + 1 (I = 1, 2,..., n-1) are multiplicative. The order of matrix multiplication is expressed by the method of adding brackets. The calculation amount (multiplication times) is different in different calculation orders. Find A method of adding brackets to minimi ...
Posted by scept1c on Sun, 16 Jan 2022 04:02:16 +0100
Algorithm basic enumeration
t1 fake coin poj1013
Idea:
First of all, you should know that the subject already knows the weighing results, and each input is three groups of data, so define three character arrays to store three groups of data of the left balance, three groups of data of the right balance and three groups of data of the weighing results, and then define an ...
Posted by bizshop on Sat, 15 Jan 2022 23:50:47 +0100
Joseph problem (array + queue + formula iteration + recursion)
Joseph problem (array + queue + formula iteration + recursion)
The Joseph Ring problem originates from a Jewish story: The Romans captured the bridge Tapat, and 41 people hid in a cave to escape the catastrophe. Among the 41 people, the historian Josephus (Joseph) and one of his friends. The remaining 39 people decided to commit collective sui ...
Posted by QbertsBrother on Sat, 15 Jan 2022 22:59:10 +0100
Analysis of Luogu cf803a maximum binary matrix
Source of original title: CodeForces 803A
Title Description:
You are given matrix with n rows and n columns filled with zeroes. You should put k ones in it in such a way that the resulting matrix is symmetrical with respect to the main diagonal (the diagonal that goes from the top left to the bottom right corner) and is lexicographical ...
Posted by runsum on Sat, 15 Jan 2022 18:31:23 +0100
Detailed solution to bit operation - 2018 CCPC Guilin station: D. Bits Reverse
Bit operation problem solution
Question source: 2018 CCPC Guilin station: D. Bits Reverse
Title Description
Topic meaning understanding
input
T
T
T groups of data, each group of data contains two integers
...
Posted by daria on Sat, 15 Jan 2022 16:01:04 +0100
SHA1 algorithm details
SHA1 algorithm details
SHA1 algorithm, as a digest algorithm, is used in various signature, digest and other scenarios. In this chapter, we analyze the details of SHA1 algorithm in detail;
Definition of terms
word: 32bit String, which can be expressed as 8 hexadecimal sequences, such as A103FE23; integer: number between 0-2 ^ 32-1; B ...
Posted by neo0506 on Sat, 15 Jan 2022 14:12:24 +0100
Binary tree traversal series summary
This paper mainly records four traversal modes of binary tree (pre order, middle order, post order and sequence).
Title reference force buckle 144.94.145.102
Tree traversal can be divided into two ways: depth first traversal (DFS) and breadth first traversal (BFS) DFS: first order traversal, middle order traversal and second order traversal a ...
Posted by Mythic Fr0st on Sat, 15 Jan 2022 12:22:37 +0100