leetcode7 recover IP address

Title: First of all, fat bloggers need to note that the length of IP address string is less than 12, and every three bits must not be greater than 255... Code reference https://www.cnblogs.com/ariel-dreamland/p/9159611.html If k = 0, three points have been added and four segments have been formed. If the string is empty at ...

Added by Locked on Tue, 31 Dec 2019 10:47:34 +0200

Collection and Iterator interface -- Java Collection Series

The Collection interface is the parent interface of the List, Set and Queue interfaces. The methods defined in the interface can be used to operate both the Set Collection and the List and Queue Collection. 1. Collection interface method 1.1 method API boolean add(Object o) Add an element to the collection and return true when the collect ...

Added by teamshultz on Tue, 31 Dec 2019 07:03:59 +0200

jquery application - find element correlation (selector);

Child element selector: // Big premise: all the selected ones are used to decorate Div. is div the first child of its parent element (without limitation)? Is it the last child? Is it the index child? Is it the only child? $('div:first-child') // Match all div s that are the first element $('div:last-child') // Mat ...

Added by johnnyboy16 on Mon, 30 Dec 2019 19:38:35 +0200

[NOI2015] sushi dinner

Problem surface meaning of the title Give n, select some numbers in 2~n, divide them into two groups, so that there are no two numbers a, B, belong to these two groups respectively, and gcd(a,b)=1, there are several kinds of partition methods practice First of all, the question meaning can be converted into two groups of n ...

Added by stephenlk on Sat, 28 Dec 2019 17:49:02 +0200

Fast sorting of data structure

Fast sorting is a sort of divide and conquer algorithm. There are three steps to quick sort: (1) . decomposition: divide the array num into three segments, with the first number as the benchmark, and put all the larger ones on the right and all the smaller ones on the left. (2) . recursive solution: decompose and sort the th ...

Added by Hebbs on Fri, 27 Dec 2019 21:08:01 +0200

The main differences between ArrayList and Vector

The List interface implements three classes: ArrayList, Vector, LinkedList. LinkedList is mainly used to maintain the insertion order of data and adopts the linked list structure. The main differences between ArrayList and Vector are as follows: (1) : Vector is thread safe. There are many synchronized in the source code, but Arr ...

Added by omelin on Tue, 24 Dec 2019 21:20:56 +0200

Multitasking process, thread and cooperation

Why multitasking? What are the benefits? A: improve the efficiency of program execution, and achieve more than two things at the same time. La La La... The key is coming. Parallel: if the number of tasks is less than the number of CPU cores, each CPU will execute multiple tasks. Then it must be busy. Multiple tasks need to be queued to wait for ...

Added by jtrost on Tue, 24 Dec 2019 21:08:42 +0200

Custom TextView - custom View, custom attribute base case

User defined view is the basis of Android development. There are not too many difficulties in itself, and there are not many knowledge points to be considered, mainly including canvas drawing related knowledge, view control measurement, user-defined attributes, etc. in this case, we try to demonstrate the above knowledge points ...

Added by therealairness on Tue, 24 Dec 2019 17:37:07 +0200

linux file find command details

1, Find file from index library: locate Index library: the operating system will periodically traverse the root file system, and then generate the index library Update index library manually: updatedb Syntax: locate [OPTION]... PATTERN Match basename only: - b Count the number of qualified documents: - c Use basic regular expression: - r ...

Added by realchamp on Tue, 24 Dec 2019 10:39:57 +0200

Hardcore explains Jetpack's life cycle source code

Previous Hard core explains the use of life cycle of Jetpack This paper mainly introduces the significance of life cycle, basic and advanced use methods. Today, I don't want to talk much about it, just start rolling source code. This article is based on the android_9.0.0_r45 Source code, all relevant source code including comments have been upl ...

Added by jeffwhite on Mon, 23 Dec 2019 23:58:25 +0200