Shortest path algorithm

adjacency matrix Let a graph have $n $points, then the adjacency matrix of the graph is a matrix of $n * n $. So a two-dimensional array $map [] [] $is used to store the adjacency matrix. For example, if you know that the path weight from $x $to $y $in an undirected graph is $z $, you can assign $map[x][y] $to $z $. Because it is an undirected ...

Added by LoganK on Wed, 12 Jan 2022 14:06:21 +0200

Section 8. Discretization (integer order)

1, Meaning of discretization: For array a [] = {1,31002000500000,...}, Map them one by one to subscripts 0,1,2,3,4 This process is called discretization be careful: There may be duplicate elements in a [], which need to be de duplicatedHow to calculate the value of x after discretization: dichotomy 2, Discrete process Usage of vecto ...

Added by altexis on Wed, 12 Jan 2022 11:42:26 +0200

Various basic operations of headless node and headless node in single linked list (complete code)

The foundation is weak and the understanding is still shallow. If there are mistakes, please correct them. Linear list single chain list (β…’) Various basic operations of headless node and headless node in single linked list (complete code) Node with head #include<stdio.h> #include<malloc. h> / / this header file is required when o ...

Added by PartyMarty on Wed, 12 Jan 2022 11:20:32 +0200

Codeforces Round #734 (Div. 3)

Hello, everyone, what I bring to you today is Codeforces Round #734 (Div. 3) Explain the whole topic. Link to this article: https://www.lanqiao.cn/questions/204012 Thank Lqyk students of blue bridge cloud class for their solutions. A. Polycarp and Coins Title Link https://codeforces.com/contest/1551/problem/A General idea of the topic ...

Added by MnM333 on Wed, 12 Jan 2022 09:50:43 +0200

Digital signature application

introduction Digital signature can ensure the integrity and non repudiation of file data. This time, we will use the Java language to realize the digital signature and verification of files. The JDK of the Java language provides a rich cryptography class library. Elliptic curve ECDSA digital signature algorithm and SHA256 hash algorithm are ad ...

Added by rhyspaterson on Wed, 12 Jan 2022 09:31:18 +0200

Principle and implementation of ten sorting algorithms [python version]

0 Preface During the algorithm interview, the interviewer will generally ask "what is the time complexity of this algorithm? What is the space complexity? How is its stability?". In order to answer this kind of questions clearly, I combed the basic sorting algorithm. If you master these classical methods, you can do well in the c ...

Added by DimArchon84 on Wed, 12 Jan 2022 09:23:22 +0200

Prepare for the second test, three questions a day, Day05

Prepare for the second test, three questions a day Topic 1: incremental ternary subsequence (leetcode 1.12 daily) Give you an integer array nums to judge whether there is an increasing subsequence with length of 3 in this array. If such a triple subscript (i, j, k) exists and I < J < K is satisfied, so that num [i] < num [J] < nu ...

Added by prestonwinfrey on Wed, 12 Jan 2022 07:09:56 +0200

[link list of Leetcode notes] sword finger Offer 22 The penultimate node in the linked list

😈 Blog home page: 🐼 Hello, everyone. My name is classmate Zhang🐼 πŸ’– Welcome to praise πŸ‘ Collection πŸ’— Leaving a message. πŸ“ Welcome to discuss! πŸ‘€ 🎡 This article was originally written by [Hello, my name is classmate Zhang] and started at CSDN 🌟🌟🌟 ✨ Boutique column (updated from time to time) [data structure + algorithm] [notes][C l ...

Added by barryman9000 on Wed, 12 Jan 2022 06:13:11 +0200

Simple sorting algorithm

I don't know how long I haven't written a blog,,, of course I will continue to write after the final exam (although the final exam is very rubbish). I donated 300r to the Blue Bridge Cup some time ago. I don't learn some algorithms in winter vacation. I feel sorry for the money. I'll write a blog to record the learning process and review it. ...

Added by wscreate on Wed, 12 Jan 2022 06:01:44 +0200

Algorithmic Learning-Backpack Problem

1.01 Backpack Problem There are N items and a V-pack. The cost of putting item I is c[i], and the value is w[i]. Seek which items to put in your backpack to maximize the total value. The two-dimensional dynamic equation for the 01 knapsack problem is given directly: f[i][j]=max(f[i-1][j],f[j-c[i]]+w[i]); How do you understand that? Imagi ...

Added by dey.souvik007 on Tue, 11 Jan 2022 19:39:28 +0200