Solution to the 273rd weekly game of Leetcode

The first time I played leetcode, I played virtual, and briefly talked about the ideas of each question. Number reversed twice Main idea: judge whether a number is still the original number after being flipped twice, and remove the leading zero after flipping. As long as the last bit is not zero, there must be no change in flipping twice. It i ...

Posted by saeed99 on Sun, 02 Jan 2022 12:26:17 +0100

[Blue Bridge Cup java_group C · volume from scratch] section 3 (attached), for loop exercises (data and graphics)

catalogue 1, Basic data 1. Fibonacci sequence 2. Daffodils number 3. A horse carries grain 4. Cross the intersection 5. Stack paper 2, Graphic text printing 1. Print square 2. Left right triangle 3. Right right triangle 4. Isosceles triangle 5. Inverted left right triangle 6. Inverted right right triangle 7. Diamond 8. Yang Hui t ...

Posted by smclay on Sun, 02 Jan 2022 12:07:55 +0100

[traffic sign recognition] traffic sign recognition based on matlab GUI BP neural network (with panel) [including Matlab source code phase 1647]

1, Introduction of BP neural network traffic sign recognition Road traffic signs are used to prohibit, warn, instruct and restrict road users to use roads in an orderly manner to ensure travel safety If the road traffic signs can be recognized automatically, the occurrence of road traffic accidents will be greatly reduced However, due to the c ...

Posted by mckinney3 on Sun, 02 Jan 2022 09:21:23 +0100

C + + demonstrates the breadth traversal and depth traversal of undirected graphs

A little white ~ ~ ~ directly on the report and code [problem description] Write a program to demonstrate the traversal operation of undirected graph. [basic requirements] Taking adjacency table as storage structure, the depth first and breadth first traversal of connected undirected graph are realized by recursive algorithm.With the help o ...

Posted by siobhan on Sun, 02 Jan 2022 03:22:16 +0100

java Decorator Pattern

1, Decorator mode definition 1. Dynamically add some additional responsibilities to an object. In terms of adding functions, decoration pattern is more flexible than generating subclasses Component abstract component Component is an interface or abstract class, which is to define our core objects, that is, the most primitive objects. Defining ...

Posted by gateway69 on Sat, 01 Jan 2022 22:53:24 +0100

R language GGPLOT2 to draw ring chart radar chart / star chart / Polar Chart / radial chart Polar Chart visual analysis of vehicle performance data

Original link: http://tecdat.cn/?p=24896Beautiful circle chart. I'm not sure if there is any additional benefit to the data analyst itself, but if it can attract the attention of decision makers, it is additional value to me.However, with coord\_polar() or coord in ggplot2 found occasionally\_ Radar () can be difficult to build. The two main pr ...

Posted by Abz on Sat, 01 Jan 2022 21:27:26 +0100

01 knapsack problem (explanation of state transition equation)

1. Topic introduction: There are N # items and a backpack with a capacity of V. each item has its own value and can only be selected once. Under the limited backpack capacity, the total value of the loaded items is the largest. "0-1 knapsack" is a relatively simple dynamic programming problem and the basis of other knapsack problems ...

Posted by DigitHeads on Sat, 01 Jan 2022 19:38:20 +0100

Codeforces 1557c moamen and XOR (combinatorial thinking)

Title Link: Moamen and XOR General meaning Given n and k, let you construct a length of n n Sequence a [], each element less than 2 k 2^k ...

Posted by mr.rum on Sat, 01 Jan 2022 19:21:54 +0100

Topic 4: parallel search unit (dsu)

other 1.HDU 1272 Xiao Xi's maze This question is old. Pro test: (1) There is a set of test samples. Only two zeros are entered for additional judgment. (2) The number is not necessarily 1~n, and there is a number jump. (3) See the problem clearly. Make sure the graph is connected. #include<cstdio> #include<algorithm> #include< ...

Posted by will on Sat, 01 Jan 2022 19:08:27 +0100

Basic sorting algorithm

Sorting algorithmAverage time complexityWorst time complexitySpatial complexityData object stabilityBubble sortingO( n 2 n^{2} n2)O( ...

Posted by Devil_Banner on Sat, 01 Jan 2022 17:09:09 +0100