P1262 spy network

Title Description National security is in high crisis due to the infiltration of foreign spies. If A spies have criminal evidence of B spies in their hands, A can reveal them.B. Some spies take bribes and give them a certain amount of dollars so they are willing to hand over all the information they have in their hands. So if we can buy some s ...

Posted by gregsmith on Thu, 07 Oct 2021 09:42:17 -0700

GTSAM Tutorial learning notes

GTSAM Tutorial learning notes In order to learn LIO-SAM, I quickly read Robot Perception: application of factor graph in SLAM and GTSAM Tutorial shared by big brother Dong Jing in bubble robot. The content of this blog is mainly the learning notes of GTSAM Tutorial, and make some simple analysis on the practical application of GTSAM in LIO ...

Posted by helraizer on Thu, 07 Oct 2021 09:39:05 -0700

Source code analysis of Miracle cryptographic algorithm open source library: mraes.c

2021SC@SDUSC Application and practice of software engineering in school of software, Shandong University 1, mraes.c structure The overall structure of mraec.c is as follows, with fbsub, ftable1 and other arrays, which mainly implements aes_decrypt ,aes_encrypt,aes_end,aes_getreg,aes_init,aes_reset several important functions in the miracl ope ...

Posted by adam_gardner on Thu, 07 Oct 2021 09:25:39 -0700

The kth largest element in the array of LeetCode

The title requires the k-largest element in the array. My most direct idea is to sort the whole array and then return the k-largest element in the array. 1. Bubble sorting To complete the sorting of the array nums, bubble sorting requires nums.size() - 1 round of sorting, because the last element does not need to be sorted. Bubble sort e ...

Posted by capitala on Thu, 07 Oct 2021 08:33:11 -0700

Interview question 8 - next node of binary tree

Title: Given a binary tree and one of its nodes, please find the next node in the middle order traversal order and return. Note that the nodes in the tree contain not only left and right child nodes, but also pointers to parent nodes. Problem solving ideas: Let's take the above figure as an example. The middle order traversal of the binary ...

Posted by lemonpiesaregood on Thu, 07 Oct 2021 08:19:57 -0700

[sword finger Offer] stack and queue

Sword finger Offer 59 - I. maximum value of sliding window Given an array num and the size k of the sliding window, please find the maximum value in all sliding windows. Example: input: nums = [1,3,-1,-3,5,3,6,7], and k = 3 output: [3,3,5,5,6,7] explain: Position of sliding window Maximum --------------- -- ...

Posted by marsupillami on Wed, 06 Oct 2021 19:55:20 -0700

7, Binary tree (18): path sum

Force button topic link (opens new window) Given a binary tree and a target sum, judge whether there is a path from root node to leaf node in the tree. The sum of all node values on this path is equal to the target sum. explain:   A leaf node is a node that has no children. Example:   Given the following binary tree, and the ...

Posted by pbdude23 on Wed, 06 Oct 2021 17:19:01 -0700

Java singleton pattern

Java singleton pattern Single case introduction Singleton Pattern is one of the simplest design patterns in Java. This type of design pattern is a creation pattern, which provides the best way to create objects. This pattern involves a single class that is responsible for creating its own objects while ensuring that only a single object is c ...

Posted by RGBlackmore on Wed, 06 Oct 2021 16:06:25 -0700

The way to solve the problem of force deduction ----- traversal of array

Refer to the brushing order: Force deduction brushing sequence This article makes a self summary, summarizes their own ideas when doing problems and the official ideas for solving problems. 485 maximum number of consecutive 1 It's a very simple question, so there's nothing to say. Put a code. class Solution { public int findMaxCons ...

Posted by eskimowned on Wed, 06 Oct 2021 14:21:40 -0700

The linked list completes the addition and subtraction of two polynomials

Content: complete the addition operation of two polynomials. It is known that there are two polynomials PM (x) and QM (x). Design an algorithm to realize the operation of Pm(x)+Qm(x) and Pm(x)-Qm(x). Moreover, the wig operation does not reopen the storage space, and it is required to be realized by chain storage structure. Steps: algorithm an ...

Posted by blckspder on Wed, 06 Oct 2021 12:20:44 -0700