leetcode algorithm problem punch in - day04

Sword finger offer 09   Queue with two stacks Implement a queue with two stacks. The declaration of the queue is as follows. Please implement its two functions appendTail and deleteHead to insert integers at the end of the queue and delete integers at the head of the queue respectively. (if there are no elements in the queue, delete head ...

Added by hacko on Wed, 01 Dec 2021 00:55:19 +0200

PE header parsing (PE header only)

Learn to understand, if wrong, also hope to point out catalogue preface process summary preface PE format is a format specification that executable programs on Windows need to comply with. Next, let's introduce the meaning of some members in the PE header. DOS header The size is fixed at 64 bytes struct _IMAGE_DOS_HEADER , {0x00 WO ...

Added by alecodonnell on Tue, 30 Nov 2021 17:45:01 +0200

STL common algorithms

summary: The algorithm is mainly composed of header files < algorithm < functional > < numeric >, which are non member functions< algorithm > is the largest of all STL header files, covering comparison, exchange, search, traversal, copy, modification, etc< numeric > is very small and only includes a few template ...

Added by screamer141 on Tue, 30 Nov 2021 14:53:09 +0200

Jilin University Chaoxing MOOC learning pass high level language programming C + + experiment 03 modular programming (level 2021)

1, Single choice questions (1 in total, 16.6 points)   one   (single topic) There are function definitions: int f(int x,int y); The following function calls are correct(     ) A.B. int n,a=0,b=1;n=int f(x,y);C. int n,a=0,b=1;n=f(a,b);D. My answer:   C   2, Procedural questions (5 questions in total ...

Added by langer on Tue, 30 Nov 2021 13:42:21 +0200

Operating system experiment: disk scheduling (JAVA)

1, Experimental purpose Disk is a high-speed, high-capacity, rotating and directly accessible storage device. As the auxiliary memory of computer system, it undertakes heavy input and output work. In modern computer system, there are often several input and output requirements requiring access to disk at the same time. The system can adopt a ...

Added by johnsiilver on Mon, 29 Nov 2021 21:07:25 +0200

Search algorithm ① basic

① Linear lookup: 1) The simplest search algorithm: directly scan the array with the for loop, look at each number, find the desired number, or count the desired results; //Find how many numbers are equal to x for (int i=0;i<n;i++){ if(a[i]==x){ cnt++; } } //Find the first position equal to x int p=-1;//Nonexistence is represented by - ...

Added by seek on Mon, 29 Nov 2021 19:34:20 +0200

C + + you should consider the place operation rather than the insert operation -- C++2.0 knowledge supplement

C++2.0 knowledge supplement 1 in some cases, placement rather than insertion is considered 1.1 container with placement operation 1,emplace_back can be used to support any push_ Standard container for back;2,emplace_front can be used to support any push_ Standard container of front;3. Any standard container that supports insert operati ...

Added by ATLien on Mon, 29 Nov 2021 16:00:46 +0200

UE4 synchronous and asynchronous loading

UE4 synchronous and asynchronous loading 1. Resource reference Resource reference is divided into resource soft reference and resource hard reference. Soft references are usually references that only store the resource path of resource objects without coupling with resources (soft references are loaded into memory, reference objects will not ...

Added by cybercog on Sun, 28 Nov 2021 21:43:20 +0200

HZNUOJ problem dynamic programming

hznuoj topic   [C series synthesis 1] game master I   Description ydw of ACM team is a game enthusiast. He likes to play all kinds of stand-alone games and is happy to get all kinds of endings. However, due to the limited time (he also has to issue TAT), he can only choose a few endings he likes to pass. Because ydw is a game exper ...

Added by markusn00b on Sun, 28 Nov 2021 14:07:47 +0200

Callable Object Wrapper, Binder

[From] Author: Su Fang Links: https://subingwen.com/cpp/bind/ Source: Big C who likes programming 1. Callable Objects Is a function pointer int print(int a, double b) { std::cout << a << b << std::endl; return 0; } // Define Function Pointer int (*func)(int, double) = &print; Is a class object (parafunction) wi ...

Added by perrohunter on Sat, 27 Nov 2021 00:04:28 +0200