Shortest path algorithm

There are two main solutions to the shortest path algorithm: 1. Dijestra algorithm for single source: One point to all points. The main feature is to take the starting point as the center and expand outward layer by layer until it reaches the end point. Dijkstra algorithm is very useful Representative shortest path algorithm Algorithm details: ...

Added by methyl_blue on Fri, 04 Mar 2022 14:06:00 +0200

C++11 | new features [common series]

1, Keywords 1.1 alignas func: the specifier can be applied to the declaration of variables, non bit field class data members, class/struct/union and enumeration definitions. Cannot be applied to parameters;Note: but it is weaker than the original alignment; struct alignas(8) S {}; struct alignas(1) U { S s; }; // Error: if there is ...

Added by Slippy on Fri, 04 Mar 2022 13:25:44 +0200

vector container of C + + high-order STL

The vector container is the best alternative to arrays vector container can also be used to save and manage a large amount of data of the same type, but it is superior to array in terms of memory management and access to data elements: The dynamic increase or decrease of the capacity of the vector container replaces the fixed capacity of the a ...

Added by lordfrikk on Fri, 04 Mar 2022 13:02:24 +0200

Notes of the Blue Bridge Cup book (4: follow the content of the previous blue bridge cloud class, C + +)

The experiment in this section is mainly to integrate and run through the knowledge points we have learned before, and explain the actual combat through four real blue bridge cup questions, so as to lead you to apply what you have learned. One of the best lectures on the real topic of the Blue Bridge Cup Real question of 2020 Blue Bridge ...

Added by sudhakararaog on Fri, 04 Mar 2022 12:01:22 +0200

Dark horse programmer C + + learning record: class and object part5 operator overloading

4.5 operator overloading 1. Overload of plus operator 2. Shift left operator overload cout: standard output stream object. There can only be one object globally, so it can only be passed by reference Always add input to the back: the idea of chain programming: Chain programming idea: it is to pass multiple operations (multiple lines of ...

Added by Pintonite on Fri, 04 Mar 2022 11:40:33 +0200

STL set container multiset container

Containers in STL: set container common interfaces and usage of multiset container: set / multiset container: also known as a set, all elements are automatically sorted when inserted (from small to large, i.e. ascending) Bottom structure of set / multiset container: these two containers belong to associative containers, and the bottom stru ...

Added by anindya23 on Fri, 04 Mar 2022 11:02:06 +0200

STL source code analysis Reading Note 4 (Sequence container list)

1, Overview   list and vector in the previous chapter are the most commonly used containers in our daily development. However, unlike vector, list is not an absolutely fixed container of continuous space. The reason why it is designed in this way is to consider the time consumption of deleting and inserting continuous space. STL list is a ...

Added by emma57573 on Fri, 04 Mar 2022 09:47:56 +0200

Implementation of hash table

1. Hash table Note 1 Note 2 Hash table (also known as hash table) is a data structure that is accessed directly according to the key value. That is, it accesses records by mapping key values to a location in the table to speed up the search. This mapping function is called hash function, and the array storing records is called hash table. Hash ...

Added by dcole on Fri, 04 Mar 2022 08:31:02 +0200

One of the third written test questions of 2021TX development: Game Club

Topic overview The game club, as its name suggests, is a club composed of several small games. When players enter the club, they will get a list of games, listing the n small games open in the club today, of which the i small game must beComplete within time (assuming that the player enters the club at time 0, it only takes one unit time to st ...

Added by uramagget on Fri, 04 Mar 2022 03:28:59 +0200

c language memory distribution and pointer assignment error (RO area error)

catalogue Memory distribution in C Memory space is divided into heap, stack and program area Stacking area:    that is, dynamic memory allocation. Programmers can apply for any size of space through malloc, but remember to release free after using this space, so as not to cause memory leakage. Stack area:    the st ...

Added by cyberRobot on Fri, 04 Mar 2022 02:45:42 +0200