The number i/ii/iii that appears only once in LeetCode
The number i that appears only once
Title Description
Topic analysis
When I first looked at the question of xxxx, I had no idea at all. The method is too inefficient. Later, I saw on the Internet that the solution uses XOR, but I haven't understood what the principle is. Recently, the school is learning "the principle of computer ...
Posted by taiger on Sun, 05 Sep 2021 11:16:27 -0700
[C + + programming problem] occupy seats
[problem description] the classroom seats in sun's school can be reserved every day. A person can occupy multiple seats and must have consecutive seats. If he can't occupy so many seats he requires, he won't want any more. In order to reduce the difficulty, seats are allocated from small to large according to the seat number each time, and seat ...
Posted by Mad_Mike on Sun, 05 Sep 2021 11:03:49 -0700
[summary of Java Web basics about encapsulation
This bad smell results when implementation changes are not encapsulated in abstractions and hierarchies.
The forms are usually as follows:
The client program is closely coupled with the service variants it needs. Whenever it needs to support new variants or modify existing variants, it will affect the client program. Whenever new variants n ...
Posted by ta2 on Sun, 05 Sep 2021 09:40:12 -0700
C++ Data Structure and Algorithmic Analysis--Binary Search
Binary Search
introduce
Binary search, also known as half search, logarithmic search.Is an algorithm used to find a number in an ordered array.
Example
Title Description
Given an ordered ascending integer array of n elements, nums, and a target value, write a function to search for the target in nums, and return -1 if the target value has ...
Posted by cmason22 on Sun, 05 Sep 2021 09:18:10 -0700
[image registration] image registration based on Powell + ant colony algorithm matlab source code
1, Introduction
1 origin and development of ant colony algorithm (ACA) In the process of studying the new algorithm, Marco Dorigo and others found that when ant colony is looking for food, they can exchange foraging information by secreting a biological hormone called pheromone, so they can quickly find the target. Therefore, in their doctoral ...
Posted by Adeus on Sat, 04 Sep 2021 20:02:30 -0700
PAT (Grade A) 2019 autumn test 7-2 Merging Linked Lists (25 points) Ling Chen 1642
PAT (Grade A) 2019 autumn test 7-2 Merging Linked Lists (25 points)
Title Description:
Given two singly linked lists L1=a1→a2→⋯→an−1→an and L2=b1→b2→⋯→bm−1→bm. If n≥2m, you are supposed to reverse and merge the shorter one into the longer one to obtain a list like a1→a2→bm→a3→a4→bm−1⋯. For example, given one list being 6→7 and the other one 1 ...
Posted by jwinn on Sat, 04 Sep 2021 13:38:14 -0700
[VRP Problem] solve CDVRP problem based on genetic algorithm and particle swarm optimization
1, Introduction to particle swarm optimization
Particle swarm optimization algorithm was proposed by Dr. Eberhart and Dr. Kennedy in 1995. It comes from the study of bird predation behavior. Its basic core is to make use of the information sharing of individuals in the group, so as to make the movement of the whole group produce an evol ...
Posted by deane034 on Sat, 04 Sep 2021 10:57:32 -0700
[TSP problem] Solving TSP problem based on genetic algorithm and particle swarm optimization
1. Introduction to Particle Swarm Optimization
Particle swarm optimization (PSO) was proposed by Dr. Eberhart and Dr. Kennedy in 1995. It originated from the study of bird predation behavior.Its basic core is to make use of the sharing of information by individuals in the group so that the movement of the whole group can evolve from diso ...
Posted by stuartbates on Sat, 04 Sep 2021 09:42:18 -0700
Common sorting algorithms
1. Bubble sorting
thought
Traverse the array. Compare and adjust the two adjacent numbers from front to back for all the numbers in the range that have not been ordered at present. The larger number sinks back and the smaller number rises forward. Each traverse will sink the largest number. The sunk numbers do not need to participate in t ...
Posted by drorgo on Fri, 03 Sep 2021 22:14:33 -0700
Python machine learning -- Classification \ Regression -- decision tree algorithm
Decision tree algorithm type
Decision tree is a series of algorithms, not an algorithm. The decision tree includes ID3 classification algorithm, C4.5 Classification Algorithm, Cart classification tree algorithm and Cart regression tree algorithm. Decision tree can be used as both classification algorithm and regression algorithm. Therefore, de ...
Posted by palito on Fri, 03 Sep 2021 19:20:09 -0700