LeetCode brushing day 6 (string arrangement)
subject
Give you two strings s1 and s2 and write a function to determine whether s2 contains the arrangement of s1. In other words, one of the permutations of s1 is a substring of s2. Example 1:
Input: s1 = "ab" s2 = "eidbaooo"
Output: true
Explanation: s2 contain s1 One of the permutations of ("ba").
Example 2:
Input: s1= "ab" s2 = ...
Posted by jblack on Wed, 29 Dec 2021 08:45:06 +0100
Classification and requirements of Algorithm Engineers
(1) Image algorithm / Computer Vision Engineer
include Image algorithm engineer, image processing engineer, audio / video processing algorithm engineer, Computer Vision Engineer
requirement: Major: Major in computer, mathematics and statistics; Technical field: Machine learning, pattern recognition Technical requirements: (1) Proficient in sh ...
Posted by paulsbooker on Wed, 29 Dec 2021 07:58:10 +0100
[ACWing] 4228. Eight digital II
Title address:
https://www.acwing.com/problem/content/description/4231/
In a
3
×
3
3×3
three × In the grid of 3,
1
∼
8
...
Posted by sandingmachine on Wed, 29 Dec 2021 00:43:46 +0100
c + + algorithm notes (under update)
algorithm
Sorting algorithm
There are basically eight sorting algorithms
Bubble sortingInsert sortHeap sortSelect sortQuick sortMerge sortCardinality sortShell Sort
Of course, it is not required to fully master all sorting methods. Nevertheless, it is necessary to understand the implementation principle. This provides ideas for us to e ...
Posted by gtal3x on Tue, 28 Dec 2021 23:51:32 +0100
Heap - find and sort
Question A: large top pile or small top pile?
Title Description
The task queue processed by a CPU is not always processed in chronological order. Some tasks have higher priority. For example, one task needs to schedule the nuclear reactor, and the other task is to print a document. For this task selection and execution scenario that needs t ...
Posted by SargeZT on Tue, 28 Dec 2021 18:03:42 +0100
Maximum subarray sum (maximum sum of continuous subarrays) -- Fundamentals
Maximum subarray sum (dynamic programming, divide and conquer):
The solution of this problem is only for personal understanding. If there are other ideas or solutions, welcome to explore! Buckle link: Maximum sum of consecutive subarrays
Title:
Enter an integer array. One or more consecutive integers in the array form a sub array. ...
Posted by ihw13 on Tue, 28 Dec 2021 15:05:33 +0100
⚡ Postgraduate entrance examination interview ⚡ Algorithm daily practice - longest palindrome substring
subject
Give you a string s and find the longest palindrome substring in S.
Example 1:
Input: s = "babad"
Output:"bab"
Explanation:"aba" The same answer is in line with the meaning of the question.
Example 2:
Input: s = "cbbd"
Output:"bb"
Example 3:
Input: s = "a"
Output:"a"
Example 4:
Input: s = "ac"
Output:"a"
Tips:
1 ...
Posted by alsinha on Tue, 28 Dec 2021 12:36:31 +0100
Huffman tree sorting
Huffman coding
Huffman coding is mainly used in information compression. It is a coding method with high compression efficiency at present. When implementing Huffman coding, binary tree is used for implementation.
Here is a simple example of Huffman coding. For an article, extract all the words and the number of occurrences. Then how to encod ...
Posted by ununium on Tue, 28 Dec 2021 11:49:57 +0100
[case of algorithm thousand questions] daily LeetCode punch in - 96. The number of lines required to write a string
📢 preface
🚀 Algorithm problem 🚀
🌲 Punching out an algorithm problem every day is not only a learning process, but also a sharing process 😜🌲 Tip: the problem-solving programming languages in this column are C# and Java🌲 To maintain a state of learning every day, let's work together to become the great God of algorithm ...
Posted by GoodWill on Mon, 27 Dec 2021 22:27:29 +0100
Java random Prim algorithm and A * algorithm produce random mazes
Procedure requirements:
1. Randomly generate maze map
The maze map needs to be randomly generated in the game and Java util. Random class uses the random number generation method provided by random class to randomly generate obstacles, paths or rewards. Maze map is represented and stored by two-dimensional array.
2. Judge whether the player ...
Posted by bhawap on Mon, 27 Dec 2021 14:04:11 +0100