Algorithm problem solving (Leetcode 33, 34, 39, 42, 46)

33. Search rotation sort array - medium - 9 / 17 33. Search rotation sort array - medium The integer array nums is arranged in ascending order, and the values in the array are different from each other. Before passing to the function, Num rotates on a previously unknown subscript k (0 < = k < num.length), making the array [num [k], ...

Posted by F1Fan on Fri, 24 Sep 2021 00:47:47 -0700

Constructive Gray Code for Divide and Conquer (C++)

Today, the arithmetic teacher set up a divide-and-conquer job to build graycodes. As a programming whitespace, he thought about it for hours before he happened to finish it. So he thought about taking his own notes on CSDN, which is also my first blog post. Origin: Gray code is a 2^n sequence with no identical elements in the sequence, and ...

Posted by Spudgun on Thu, 23 Sep 2021 09:42:17 -0700

LeetCode 88.Merge two ordered arrays Java

Title Description Give you two arrays of integers nums1 and nums2 in a non-decreasing order, with two integers m and n representing the number of elements in nums1 and nums2, respectively. Please merge nums2 to nums1 so that the merged arrays are also in a non-decreasing order. Note: Ultimately, the merged array should not be returned by a f ...

Posted by Hebbs on Thu, 23 Sep 2021 09:18:48 -0700

[prediction model] optimize BP neural network based on differential evolution algorithm to realize data prediction matlab source code

1 Introduction to algorithm 1.1 introduction to the principle of BP neural network Neural network is the basis of deep learning. It is widely used in machine learning and deep learning, such as function approximation, pattern recognition, classification model, image classification, CTR prediction based on deep learning, data compression, data ...

Posted by jdwmk on Thu, 23 Sep 2021 08:31:22 -0700

[small Y learning algorithm] โšก Daily LeetCode punch in โšก Table 3-39. Preorder traversal of binary tree

๐Ÿ“ข preface ๐Ÿš€ Algorithm problem ๐Ÿš€ ๐ŸŒฒ Punching out an algorithm problem every day is not only a learning process, but also a sharing process ๐Ÿ˜œ๐ŸŒฒ Tip: the problem-solving programming languages in this column are C# and Java๐ŸŒฒ To maintain a state of learning every day, let's work together to become the great God of algorithm ...

Posted by Kev on Thu, 23 Sep 2021 07:54:04 -0700

Kalman filter for tracking and prediction of moving targets on images

Kalman filter for tracking and prediction of moving targets on images brief introduction Kalman filter predicts the current state through the previous state and uses the current observation state for correction The direct measurements are left, top, right and bottom, representing the upper left and lower right coordinates of the targe ...

Posted by henrygao on Thu, 23 Sep 2021 07:07:48 -0700

Binary sort tree

Binary sort tree 1, Definition Binary Sort Tree, also known as binary search tree. It is either an empty tree or a binary tree with the following properties. 1. If its left subtree is not empty, the values of all nodes on the left subtree are less than the values of its root node. 2. If its right subtree is not empty, the values of all nodes ...

Posted by muppet on Thu, 23 Sep 2021 04:43:25 -0700

leetcode brush record day009:28 and 8

28. Simple difficulty: passing rate 40% explain: What value should we return when need is an empty string? This is a good question in the interview. For this problem, we should return 0 when need is an empty string. This is consistent with the C language's str () and Java's indexOf() definitions. Question to charity: haystack and need are onl ...

Posted by cavemaneca on Thu, 23 Sep 2021 04:25:57 -0700

Selection sorting and insertion sorting and comparison - sorting - algorithm version 4

1, Select sort 1. Algorithm description First, find the smallest element in the arraySecond, it interacts with the first element of the arrayAgain, find the smallest element in the remaining array elements and interact it with the second element of the arrayRepeat until the entire array is sorted 2. Analysis Compare elements: compare th ...

Posted by kbaker on Thu, 23 Sep 2021 03:47:57 -0700

[2021-9-23] supplementary question record

Educational Codeforces Round 54 (Rated for Div. 2) E. Vasya and a Tree Main idea of the topic: given a tree with 1 as the root node, each node value is 0, given several modifications, x,d,v, is the y value of X node and its dist (x, y) < = D, plus v, and finally outputs the value of each node; Solution: for offline modification, use the tree ...

Posted by daniel_lee_hill on Thu, 23 Sep 2021 01:05:23 -0700