Data structure experiment

1. [problem description] There are n people sitting around a round table. Now start counting from the s person, count to the m person, then start counting again from the next person, and count to the m person again. Repeat until all people are listed. The Josephus problem is: for any given n, m, s, find the sequence table of n people obtained ...

Added by dajawu on Mon, 03 Jan 2022 11:37:05 +0200

Learned the shortest path problem of a graph

The shortest path problem of a graph Description The weather is getting colder. The old and frail Yueyue bird plans to spend the winter in a city with appropriate temperature in the south. However, due to the serious aging of its wings, the farthest flight distance is limited. Please calculate the shortest distance required for the poor Yueyue ...

Added by SWI03 on Mon, 03 Jan 2022 10:15:22 +0200

UVA - 442 Matrix Chain Multiplication

This is a classic and difficult stack problem Valley link ** Topic introduction ** Input format Output format Know the Chinese translation you can't understand: Matrix chain multiplication Title Description Suppose you have to evaluate an expression form, such as ABCDE, where A,B,C,D,E are matrices. Since matrix multiplication is a ...

Added by ankur0101 on Mon, 03 Jan 2022 09:51:38 +0200

Fall detection algorithm - differential threshold

Overall thinking According to the relevant data, if the acceleration is divided into three directions: X, y and Z, the Z axis is perpendicular to the ground, and the X and Y axes are parallel to the ground, the acceleration in the Z axis direction is about equal to the gravitational acceleration g under normal conditions; In case of falling be ...

Added by white99 on Mon, 03 Jan 2022 09:23:07 +0200

The transformation of recursive algorithm with classic cases (monkey eating peach problem) and irregular cases, including the core idea

1, Overview of method recursion 1. What is method recursion The form in which a method calls itself directly or indirectly is called method recursion. As an algorithm, recursion is widely used in programming languages. 2. Recursive form Direct recursion: the method calls itself. Indirect recursion: the method calls other methods, and othe ...

Added by dschreck on Mon, 03 Jan 2022 08:15:32 +0200

Two discussions on Apriltag processing

Introduction: ※ apriltag detection is a relatively simple method based on visual positioning. This paper discusses the effect of homography matrix in apriltag detection results, which is inconsistent with the application that can be directly used to draw apriltag normal vector. The ability of apriltag algorithm pasted on non plane is tested. If ...

Added by who_cares on Mon, 03 Jan 2022 07:28:53 +0200

No. 406 of the 24 force deduction hot question brushing record The cohort was reconstructed according to height

Catalogue of series articles Force deduction hot question brushing record preface Make a little progress every day!! 1, Background For a group of people, there are two information about them. The first is the height information, and the second is how many people are taller (> =) than them in front of them. According to these informa ...

Added by reinmedia on Mon, 03 Jan 2022 06:10:58 +0200

Day 11 of learning python

Day 11 of learning python One week summary This week we will mainly learn the content list tuple character string aggregate Dictionaries Mainly learn to master their operations and functions The first is the list list The list supports functions such as adding, deleting, modifying and querying, section Syntax ------ > [start: e ...

Added by Mikkki on Mon, 03 Jan 2022 05:55:21 +0200

Recursion and recursion

Recursion and recursion To Iterate is Human,to Recures,Divine Man understands iteration, God understands recursion Ladder problem Recursive Method Space complexity: O(1) Time complexity: O(2^n) analysis: Space complexity: because recursion does not apply for additional space, it is O(1)Time complexity: the number of recursions increase ...

Added by viv on Mon, 03 Jan 2022 03:03:45 +0200

Implementation and application of treap

Implementation and application of tread concept Tree is a combination of tree+heap. As its name suggests, it has the properties of both heap and binary search tree Each node in the tree has two attributes A A A and B ...

Added by abnfire on Sun, 02 Jan 2022 23:36:15 +0200