Regular expression matching algorithm for problem solving
Title Description
This topic comes from Force buckle , the difficulty is: difficulty, the title is described as follows: Give you a string s and a character rule p, please implement a support '.' Matches the regular expression of '*'.
โ.โ Match any single character'*' matches zero or more preceding elements
The so-called mat ...
Posted by jkeppens on Sun, 30 Jan 2022 21:59:01 +0100
Common load balancing algorithms for distributed system design
Common load balancing algorithms for distributed system design
0 what is load balancing?
Load Balance means to balance the load (work task) and allocate it to multiple operation units for operation, so as to complete the work task together.
What are the types of load balancing?
Software and hardware load balancing
Software load balancin ...
Posted by Drebin on Sun, 30 Jan 2022 21:48:30 +0100
Algorithm design and analysis and search set
Joint search set
summary
Function: support the rapid merging and searching of collections, with time complexity of O (1)Two basic methods: isSameSet: whether two sets belong to the same set; union: merge two setsThe traditional data structure can not support the rapidity of the two methods at the same time. For example, the linked list st ...
Posted by eagle1771 on Sun, 30 Jan 2022 20:44:02 +0100
[data structure] tree - traversal of binary tree (dynamic diagram, c + +, java, recursion, multi thought non recursion)
GitHub sync update (Classified): Data_Structure_And_Algorithm-Review (it's best to give a star!!!)
The following is the main body of this article, and the following cases can be used for reference.
Traversal of binary tree
Traversing a binary tree is to access each node in the binary tree successively and only once according to a searc ...
Posted by jasonmills58 on Sun, 30 Jan 2022 18:12:42 +0100
2022 Niuke winter vacation algorithm basic training camp 3
E -- easy version of zhinai
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 1e5 + 10, mod = 1e9 + 7;
int a[N];
bool st[N];
bool cmp(char a,char b)
{
return a > b;
}
int main()
{
int n, m, k;
cin >> n >> m >> k;
...
Posted by zysac on Sun, 30 Jan 2022 16:06:42 +0100
Implementation, connection and difference of Prim & Dijkstra & Floyd algorithm && using Floyd algorithm to find sub short path
Implementation, connection and difference of prim & Dijkstra & Floyd algorithm && using Floyd algorithm to find sub short path
catalogue
Prim & Dijkstra L & Floyd, these algorithms are actually a handsome group, that is, the data structure class is too disgusting (I know everything), and I don't really realize the b ...
Posted by frosty1433 on Sun, 30 Jan 2022 14:12:19 +0100
The fourth week of Leetcode problem brushing training
array
Leetcode 119: Pascal's Triangle IIeasy
Key to problem solving:
Violent solution, construct pascal's triangle, find the row corresponding to rowIndex, and construct a List// Construct the logic of pascal's triangle. Note that the array length is rowIndex + 1
int[][] triangle = new int[rowIndex + 1][rowIndex + 1]
for (int i = 0 ...
Posted by k994519 on Sun, 30 Jan 2022 13:39:24 +0100
Force buckle - minimum stack (Java implementation)
Topic content
Design a stack that supports push, pop and top operations and can retrieve the smallest element in a constant time.
push(x) -- push element x onto the stack.pop() -- delete the element at the top of the stack.top() -- get the stack top element.getMin() -- retrieves the smallest element in the stack.
Example:
Input:
["MinStack" ...
Posted by psycovic23 on Sun, 30 Jan 2022 13:16:12 +0100
Properties of composite and prime numbers
Prime number definition
If a number is a prime number, it has only two common factors (divisor) of itself and 1, otherwise it is a composite number.
Write a program to judge whether a number is a prime number
If the data to be judged is N: The general idea is to divide N from 2 to see whether there is a number that can divide N in the interv ...
Posted by michelledebeer on Sun, 30 Jan 2022 13:02:59 +0100
leetcode weekly The 278th game of the week is really difficult, but you can still brush the inverted hash of simple sorting + traversal prefix and traversal string
๐ Content of this article: leetcode weekly The 278th game of the week is really difficult, but you can still brush simple sorting + traversal double pointer + prefix and sum ๐ Article column: leetcode weekly game punch in ๐ Last updated: January 23, 2022 leetcode weekly Game 277 of the week ๐ Personal profile: a Junior Program ape who ...
Posted by goodluck4287 on Sun, 30 Jan 2022 13:02:13 +0100