553. Optimal division / 150 Evaluation of inverse Polish expression
553. Optimal division [medium question] [daily question]
Idea: [mathematical method]
Let the optimal solution of dividing these n numbers be Fn=x/y. obviously, if the numerator is as large as possible and the denominator is as small as possible, the result will be the largest. Because nums are all positive integers greater than 1, the smal ...
Added by kkonline on Sun, 27 Feb 2022 07:39:33 +0200
day12_ Interface and polymorphism
Interface Overview
Interface is a reference type in the Java language and a "collection" of methods. Therefore, the interior of the interface is mainly to define methods, including constants, abstract methods (JDK 7 and before), default methods and static methods (JDK 8), and private methods (jdk9). There can be no other members in t ...
Added by vocoder on Sun, 27 Feb 2022 07:21:24 +0200
Redis 06 redis Zset structure and Application
1 zset
zset (ordered set) is the most frequently asked data structure in Redis. This ordered set is similar to the set container of C + +, but the underlying structure is different. The underlying structure of C + + is implemented using RB tree (red black tree). Unlike zset, which is implemented using a hop table.
On the one hand, zset ensure ...
Added by svenski on Sun, 27 Feb 2022 07:16:40 +0200
JAVA new an object procedure
What happens in the process of new an object?1. Confirm whether class meta information exists. When the JVM receives the new instruction, it first checks whether the class meta information to be created exists in the metaspace. If it does not exist, use the current class loader to find the corresponding class file with ClassLoader + package nam ...
Added by slands10 on Sun, 27 Feb 2022 06:49:06 +0200
How to realize Android platform GB28181 front-end device access
Technical backgroundBefore realizing the front-end device access of GB28181 on Android platform, we had very mature RTMP push, RTSP push and lightweight RTSP service modules a few years ago, especially RTMP push, which is widely used in the industry. Many developers may ask, since we have the above modules, why do we need to realize the front-e ...
Added by ROCKINDANO on Sun, 27 Feb 2022 06:45:51 +0200
[OS command injection 01] common functions that may cause OS command injection (system, exec, passthru, popen and backquote structure)
1. Overview of OS command injection
Background: when programmers use script language (such as PHP) to develop applications, script language development is very fast, concise and convenient, but it is also accompanied by some problems, such as slow speed, unable to touch the bottom of the system, etc. When developing applications, especiall ...
Added by jonnym00 on Sun, 27 Feb 2022 06:35:42 +0200
Template meta programming example -- how to design a general geometry Library
Template meta programming example - how to design a general geometry Library
design principle
Suppose you need to use a c + + program to calculate the distance between two points You might do this:
First define a struct:
struct mypoint
{
double x, y;
};
Then define a function containing the calculation algorithm:
double distance(myp ...
Added by Skaara on Sun, 27 Feb 2022 06:25:57 +0200
[C + +] object oriented encapsulation
2, Encapsulation (Part 2)
4.1 object arrays and object members
(1) Object array
Many times, we need not only one object, but a group of objects. For example, if there are 50 students in a class, we can use the object array. [object array code practice] Title: define a Coordinate class whose data members contain abscissa and ordinate. In ...
Added by martins on Sun, 27 Feb 2022 06:00:56 +0200
SpringBoot learning notes 02
1. Details of springboot
1.1 environment switching
explain: Software generally runs in many different environments There is a dev environment in the development phase Testing will be carried out after development There will be a test environment The final project is deployed to the user's service There will be a production environment Qu ...
Added by conquest on Sun, 27 Feb 2022 05:48:55 +0200
Practical application of tree structure 2
Binary sort tree
Requirements: for a sequence (7, 3, 10, 12, 5, 1, 9), it is required to query and add data efficiently
Basic introduction: Binary sort tree: BST: (Binary Sort(Search) Tree). For any non leaf node of the binary sort tree, the value of the left child node is required to be smaller than that of the current node, and the valu ...
Added by jefffan24 on Sun, 27 Feb 2022 05:43:02 +0200