The idea of this question is quite new, but it is not so disgusting compared with the realization
Because it is required to move the box less, bfs can be used. Triple (x,y,dir) is used to indicate that the box is in (x,y). dir is the direction of the box where people are
Because people are required to m ...
Posted by Otiose Dodge on Wed, 12 Feb 2020 20:33:59 -0800
shell programming condition test
Shell Conditional Judgment InitialShell branch if statementShell Loop for StatementShell branch case statementSelect List Select LoopShell loop controls continue,break,exitShell loop while statement
Shell Conditional Judgment Initial
 Represents a conditional test, ...
Posted by guxin1999 on Wed, 12 Feb 2020 18:42:12 -0800
As a new feature of java8, lambda expression is oriented to function programming, which makes the code more concise and improves the programming efficiency. As a developer, we should not only learn to use it, but also understand the operation principle behind it
lambda general use ...
Posted by ntohky14 on Tue, 11 Feb 2020 23:45:23 -0800
Natural and customized sorting of TreeSet
TreeSet is an ordered set
TreeSet supports two sorting methods, natural sorting and custom sorting. The default is natural sorting
TreeSet: the data structure of red black tree is used in the bottom layer. Red black tree is a specific type of binary tree, with ...
Posted by neofox on Tue, 11 Feb 2020 05:21:09 -0800
Solution 1 (double finger needle method)
Solution 2 (violence method)
You have an array of integers, arr. you start at the first element of the array (subscript 0).
At each step, you can jump from subscript i to subscript:
i + 1 satisfies: i + 1 < arr.length ...
Posted by magaly on Tue, 11 Feb 2020 03:17:12 -0800
1. Summary of Previous Situation
This is a tree traversal implementation. To focus on how queues are implemented, follow these articles:Data structure (3) Handwritten queues2. Basic concepts of trees
Chain lists, stacks, and queues are one-to-one linear structures, one-to-many linear structures - trees. ...
Posted by amrigo on Mon, 10 Feb 2020 21:47:25 -0800
After a container is pulled up by kubelet in k8s, the user can specify the way of sniffing to check the health of the container. TCP, Http and command are currently supported. Today, the implementation of the whole sniffing module is introduced to understand the implementation of its periodic detection, counter, delay and other design.
1. Explo ...
Posted by Stunt on Mon, 10 Feb 2020 21:21:00 -0800
Processes are also called tasks in linux.
For user space, a process is an instance of program execution.A process can be compared to a human individual: there is only one parent process and there can be multiple child processes; there are more or less valid lives; it takes on certain functi ...
Posted by parthatel on Mon, 10 Feb 2020 21:10:26 -0800
This article mainly introduces the common function set of string operation based on Python. Please refer to
1. Definition of string
3. Capitalize (capitalize())
4. Count (sub, start = none, end = none)
Posted by superpimp on Mon, 10 Feb 2020 07:23:03 -0800
1. rem Foundation
rem (root em) is a relative unit, similar to em. EM is the font size of the parent element, and the benchmark of rem is the font size of the html element.
For example, if the root element (html) is set to font size = 12px and the non root element is set to width:2rem, then ...
Posted by esconsult1 on Mon, 10 Feb 2020 04:18:18 -0800