C language / C + + common exercises Q & a collection of communication obstacles

C language / C + + common exercises Q & a collection (60): communication barriers Beauty of procedure In the Q & a session of CSDN, a little partner asked me for help, hoping to help him solve his confusion. He put forward the following questions and provided the corresponding C language implementation code. subject Enter the stud ...

Added by gregambrose on Wed, 29 Dec 2021 03:43:37 +0200

Algorithm design and analysis -- linked list

A linked list is a data structure in which objects are arranged in linear order. The linear order of the array is determined by the array subscript. However, unlike the array, the order of the linked list is determined by the pointers in each object. Linked list provides a simple and flexible representation method for dynamic sets, and can supp ...

Added by wpsa on Wed, 29 Dec 2021 01:00:44 +0200

Data structure and algorithm (ten algorithms commonly used by programmers: 1 ~ 5)

1: Binary search Binary search algorithm (non recursive) Introduction (1) Previously, we talked about the binary search algorithm, which uses the recursive method. Next, we will explain the non recursive method of the binary search algorithm (2) The binary search method is only suitable for searching from an ordered sequence of numbers (suc ...

Added by BenMo on Tue, 28 Dec 2021 23:19:42 +0200

Algorithm notes - sorting algorithm

1, Time complexity The number of constant operations to be performed by the algorithm according to the worst performance, leaving only the highest order term and removing the coefficients 2, Bubble sort, select sort, and insert sort The three simplest sorting algorithms are time complexity O(N^2) and space complexity O(1) Bubble sort: publ ...

Added by jazzydog on Tue, 28 Dec 2021 23:06:46 +0200

Summary of classical algorithms

Binary search algorithm You can use loops or recursion Divide and conquer algorithm Divide a complex problem into two or more identical or similar subproblems, and then divide the subproblem into smaller subproblems... Until the last subproblem can be simply solved directly, and the solution of the original problem is the combination of the ...

Added by MatrixDancer on Tue, 28 Dec 2021 12:59:18 +0200

LeetCode notes: Biweekly Contest 68

LeetCode notes: Biweekly Contest 68 1. Topic 1 1. Problem solving ideas2. Code implementation 2. Topic 2 1. Problem solving ideas2. Code implementation 3. Topic 3 1. Problem solving ideas2. Code implementation 4. Topic 4 1. Problem solving ideas2. Code implementation 1. Topic 1 The test question link given in questi ...

Added by secoxxx on Tue, 28 Dec 2021 10:30:32 +0200

Classic internal sort summary

Sorting algorithm directory Direct insert sortBinary Insertion Sort Shell Sort Bubble sortingQuick sortSelect sortMerge sortHeap sort 1. Insert sorting directly Direct insert sort Algorithmic thought Divide the sequence into ordered part and unordered part, select the elements from the unordered part, compare with the ordered part, fin ...

Added by burzvingion on Tue, 28 Dec 2021 06:17:09 +0200

2021 scuacm training team winter selection 2 most questions

Portal I was at the end of the preview course, but I still couldn't help writing a set of questions A Check in. How many digits of the number are 9. #include <bits/stdc++.h> using namespace std; typedef long long LL; #define rep(i,a,b) for(int i = (a);i <= (b);++i) #define re_(i,a,b) for(int i = (a);i < (b);++i) #define dwn(i,a, ...

Added by Angerslave on Tue, 28 Dec 2021 03:50:16 +0200

Data structure array

Today, I start learning java data structure. Data structure, therefore, is a storage method of data. First, open the simplest data structure, array learning. array 1. Understanding of array: an array is a collection of multiple data of the same type arranged in a certain order and named with a name, These data are uniformly managed by number ...

Added by Namadoor on Tue, 28 Dec 2021 02:40:36 +0200

Shortest path algorithm -- dijkstra

dijkstra Premise: in a graph, there can be no edges with negative weight. Give you a starting point. What is the shortest distance from the starting point to all nodes? If a point cannot be reached, the distance to this point is positive infinity (usually in a directed graph). For example, see the following figure: the set on the right repre ...

Added by kristalys on Mon, 27 Dec 2021 15:05:39 +0200