C++ Labyrinth Problem
Title Description
The labyrinth consists of N rows of M-column cells (n,m are less than 50), each of which is either empty or obstructed.
1 for open space 2 for obstacles
Now please find a shortest path length from start to end
Input Format
The first row input n,m means there are n rows and m columns
Next, type 1 and 2 for open space an ...
Added by raydar2000 on Thu, 27 Jan 2022 20:58:15 +0200
Essay -- Summary of preliminary questions of classes and objects (interview)
The difference between object oriented and process oriented
C language is process oriented and focuses on the process. It analyzes the steps to solve the problem and solves the problem step by step through function call. Process oriented is to analyze the steps required to solve the problem, and then use the function to realize these steps ...
Added by pilau on Thu, 27 Jan 2022 19:05:28 +0200
Character function and string function
1.strlen find the length of string size_t strlen ( const char * str ); (1) The string takes' \ 0 'as the end flag, and the strlen function returns the number of characters that appear before' \ 0 'in the string (excluding' \ 0 ') (2) The string pointed to by the parameter must end with '\ 0' (3) Note that the return value of the function is siz ...
Added by bmcua on Thu, 27 Jan 2022 16:17:45 +0200
Binary search tree (C + +)
Concept and operation of binary search tree
The concept of binary search tree
Binary search tree is also called binary sort tree. If its left subtree is not empty, the value of all nodes on the left subtree is less than that of the root node; If its right subtree is not empty, the value of all nodes on the right subtree is greater than th ...
Added by iversonm on Thu, 27 Jan 2022 15:16:10 +0200
C/C + + file IO function
A file is usually a named storage area on a disk or solid state drive. C mainly adopts the method of file pointer. The operation of files in C + + mainly uses the idea of "file stream" (i.e. non-standard input and output).
1, C
C regards a file as a series of consecutive bytes, each of which can be read separately. C provides t ...
Added by Prismatic on Thu, 27 Jan 2022 14:58:29 +0200
Qt uses MVC and database singleton mode to realize login function
1, Briefly describe MVC and singleton mode
1. MVC design pattern
Function: effectively separate data and user interface.Composition: model layer (representing data), view layer (representing user interface), control layer controller (defining user operations on the interface).
2. MVC frame diagram
3. Use MVC architecture to realize the pro ...
Added by rocket on Thu, 27 Jan 2022 12:59:03 +0200
Interval maintenance (block method + card constant)
Title Description:
Title portal
Problem solving ideas:
First, we ignore the title of the topic (tree array template), and let's try a new algorithm - blocking.
Block thought
Blocking is a beautiful violence (by DFT). His core idea is to maintain an interval (length:
n
...
Added by tsabar on Thu, 27 Jan 2022 12:41:35 +0200
Pointer usage
As we know, adding & before a variable is the address of the variable, and * is the address of the variable.
*Represents the address.
int* a = new int[10]; // It means that the system allocates a continuous piece of memory to store int data, and a is the starting address of this piece of memory.
*a = 10;// It means that the data in the fi ...
Added by dbradbury on Thu, 27 Jan 2022 10:32:49 +0200
C + + object oriented learning notes
Object Based vs. Object Oriented
Object Based: it is designed for a single class
Object Oriented: facing the design of multiple classes * *, the relationship between classes and classes.
Two classic classifications of classes:
Classes without pointer membersClasses with pointer members
1, Classes without pointer members
1. Defensive decla ...
Added by mrblom on Thu, 27 Jan 2022 07:57:26 +0200
[winter vacation daily question] luogu P1781 president of the universe
Title Link: P1781 president of the universe - Luogu | new ecology of Computer Science Education (luogu.com.cn)
Title Description
In the earth calendar year 6036, the whole universe is ready to run for the president of the most talented person. There are n extraordinary top-notch people running for the president. Now the votes have been counte ...
Added by phpion on Thu, 27 Jan 2022 04:34:39 +0200