C + + foundation: 2-SAT problem
summary
There is A sequence A composed of N Boolean values, which gives some restrictive relations, such as A[x] AND A[y]=0, A[x] OR A[y] OR A[z]=1. It is necessary to determine the value of A[0 * n − 1] so that it meets all restrictive relations. This is called the SAT problem (it has been determined that the SAT problem that is not 2-S ...
Added by dirkadirka on Thu, 03 Feb 2022 17:32:37 +0200
Quick notes on C + + object-oriented programming (course video link is attached)
Quick notes on C + + object-oriented programming
2022-2-3
C + + object-oriented programming B station course Cherno's course link
Part 1:
classobjectMember dataMember function (set,
class student:
{
public:
int age;
string name;
bool set(int a);
bool set(string a);
};
Object oriented code has at least three parts:
C ...
Added by pedrolopes10 on Thu, 03 Feb 2022 13:57:48 +0200
[daily force deduction 37] looting
1, Title [LeetCode-198]
You are a professional thief who plans to steal houses along the street. There is a certain amount of cash hidden in each room. The only restrictive factor affecting your theft is that the adjacent houses are equipped with interconnected anti-theft systems. If two adjacent houses are intruded by thieves on the same nigh ...
Added by ekosoftco on Thu, 03 Feb 2022 13:34:45 +0200
Data structure learning, hash table (chain address)
Dear friends, happy new year.
Hash table is essentially an array, and chain address is the array that stores the linked list.
The hash function is used to properly calculate a number to obtain the hash value of the number, and the hash table is searched, inserted and deleted according to the hash value.
Suppose this is a hash table H with ...
Added by Spectre on Thu, 03 Feb 2022 13:00:43 +0200
CF1630B Range and Partition
First, see minimize
y
−
x
y-x
y − x this thing, decisive two points
y
−
x
y-x
y &m ...
Added by rupam_jaiswal on Thu, 03 Feb 2022 12:54:12 +0200
Binary search tree
Binary search tree concept
Binary search tree, also known as binary sort tree, is either an empty tree or a binary tree with the following properties:
If its left subtree is not empty, the value of all nodes on the left subtree is less than that of the root nodeIf its right subtree is not empty, the value of all nodes on the right subtree is ...
Added by geoffjb on Thu, 03 Feb 2022 11:10:36 +0200
Notes on C++ Concurrency in Action
The English book "C++ Concurrency in Action" has been translated by different people in China. There is a version translated by four translators. Douban knows about the wind review in general. Chen Xiaowei translated well. Here are my reading notes of the translator's books.
Hello, the concurrent world of C + +
1.1 what is ...
Added by Toboe on Thu, 03 Feb 2022 10:39:56 +0200
2022-2-1 Niuke C + + project - thread synchronization
First Edition: different threads sell each other, which will lead to the final purchase of 300 tickets Because 100 is placed in local variables, each thread has one
/*
Case of using multithreading to buy tickets
There are three windows, a total of 100 tickets
*/
#include<stdio.h>
#include<pthread.h>
#include<stdlib.h>
void * ...
Added by ek5932 on Thu, 03 Feb 2022 10:08:37 +0200
Dynamic memory management
0. Preface
Why is there dynamic memory allocation?
int val = 20;//Open up four bytes in stack space
char arr[10] = {0};//Open up 10 bytes of continuous space on the stack space
Such static variables are hard to tune,Drought death,Waterlogging death
The size of the space is fixed.When declaring an array, you must specify the len ...
Added by flyhoney on Thu, 03 Feb 2022 07:53:45 +0200
STL database review
Happy New Year! The first blog in 2022 is mainly because I don't like summarizing, so I need to read more and summarize more. Then it's today's review!
1.vector
vector<int>a;
a.push_back();
a.pop_back();
a.insert(a.begin() + i, k);//Insert from position i
for (vector<int>::iterator i = a.begin(); i != a.end(); i++) {
cout ...
Added by binujayaraj on Thu, 03 Feb 2022 05:52:23 +0200