LeetCode algorithm -- binary search + double pointer
Although lz is still a master of laboratory brick moving, with the ambition of becoming an excellent programmer ape and the idea of "stupid birds fly first", I decided to start my journey of LeetCode (sprinkle flowers ★, °: ☆ ( ̄▽  ̄) / $:. ° ★.)
I measured my level rationally. After some selection, I decided to start wit ...
Posted by rroc on Mon, 01 Nov 2021 05:24:01 -0700
Look at animation algorithms: two-way queue dequeue
brief introductiondequeue refers to a two-way queue, which can insert and obtain data from the head of the queue or from the tail of the queue.This article will introduce how to create dequeue and some basic operations of dequeue.Implementation of bidirectional queueLike ordinary queue items, bidirectional queues can be inserted and deleted at ...
Posted by ch1326 on Sun, 31 Oct 2021 18:31:15 -0700
Swordfinger offer|| Special assault 40-day brush plan (days 1-20)
Title address: https://leetcode-cn.com/study-plan/lcof/?progress=xcewnbs
summary
When looking for the middle node of the chain table, use the fast and slow pointers, when both the fast and slow pointers are initially pointing to the head, the end condition cannot be
while(fast!=null&&fast.next!=null)
Because of this, if I judge ...
Posted by kusal on Sun, 31 Oct 2021 14:09:29 -0700
[Alibaba cloud Tianchi algorithm challenge] Introduction to zero basics NLP - News Text Classification - Day2 - data reading and data analysis
1, Game problem analysis
[Alibaba cloud Tianchi algorithm challenge] Introduction to zero basics NLP - News Text Classification - Day1 - Game Title Understanding_ 202xxx blog - CSDN blog
2, Data reading
After downloading the data, anaconda and python 3.8 are recommended for data reading and model training
First install the required m ...
Posted by enemeth on Sun, 31 Oct 2021 13:44:17 -0700
Data structure and algorithm I [basic concepts]
1. Concept of algorithm
Algorithm is the essence of computer processing information, because computer program is essentially an algorithm to tell the computer the exact steps to perform a specified task. Generally, when the algorithm is processing information, it will read the data from the input device or the storage address of the data, ...
Posted by messer on Sun, 31 Oct 2021 12:05:03 -0700
Codeforces Round #751 (Div. 2)(A - C)
A.Two Subsequences
Topic Essentials
Give you a string s. You need to find two non-empty strings a and b to satisfy the following conditions: (1) Strings a and b are subsequences of s. (2) For each index i, the character s [i] in the string s must exactly belong to one of the strings a or b. (3) String a is the smallest possible dictionary ...
Posted by rash on Sun, 31 Oct 2021 11:33:25 -0700
Day94: divide and conquer strategy of sorting algorithm
Day93: loop invariants of sorting algorithm < insert, select, bubble >
Divide and conquer strategy
Divide And Conquer: resolve a big problem into countless same small problems for solution, that is, the use of recursion.
Sorted divide and conquer strategy:
Continuously split set A into the same small set, and finally return to the soluti ...
Posted by mdgottlieb on Sun, 31 Oct 2021 07:36:48 -0700
java implementation of binary search tree and its related operations
java implementation of binary search tree and its related operations
The basic operations of Binary Search Tree include search, maximum, minimum, precursor, successor, insertion and deletion.
The time spent on the basic operation of the binary search tree is proportional to the height of the tree. For example, for a complete binary tree with ...
Posted by alwaysme on Sun, 31 Oct 2021 05:13:56 -0700
How to implement the customized iterator
Implement your own iterator IIImplement a tree structure container, and then implement an STL style iterator instance for it.This article is for the last article How to implement user defined iterator Provide supplementary cases.tree_ Implementation of TI intend to implement a simple but not simple tree container and make it a standard contain ...
Posted by crochk on Sun, 31 Oct 2021 05:05:17 -0700
Explanation and implementation of genetic algorithm (python)
introduction
In my opinion, genetic algorithm is an algorithm that can be considered when adjusting parameters. It is a method that can find the global optimal parameters. When the data range that needs to be adjusted is large, the exhaustive method is obviously not a good choice! Here, the genetic algorithm is implemented through a simple exa ...
Posted by Catz on Sun, 31 Oct 2021 03:22:08 -0700