Data Structure BASICS (18) and data structure basics 18
The red/black tree is a self-balancing binary search tree and a data structure used in computer science, A typical purpose is to associate arrays (map/set in C ++ STL ). It was invented by Rudolf Bayer in 1972. It is called the symmetric Binary Tree B. Its modern name is Leo J. guibas and Robert Sedgewick obtained in a paper written in 1978. Although t
Data Structure BASICS (15) and data structure basics 15
Base sorting is an internal sorting algorithm that uses the "Multi-Keyword sorting" idea to implement "Single-Keyword sorting.
There are two methods to sort multiple keywords:
Ranking priority (LSD)
First, sort K [0] {the smallest digit} of the base, and divide the record sequence into several subsequences based on different values of K (0, sort K [1 ,
Java Memory Model basics and java model Basics
Java Memory Model: 1Thread communication: 2Re-sorting: Program EfficiencyHappens-before: If yes, it will not be reordered.Memory barrier command: deprecated sortingData Dependency: a single thread exists and will not be rearranged.As-if-serial: ensures that the rescheduling has no effect on the results of a single thread.Data competition: Correct synchronizat
Python basics 6: formatting characters, colors, and python Basics
Character formatting:
1.% placeholder, % s, % d, %
2. Use format. The format is easy to use. It can be centered, %, binary, and character-filling;
1. Use Case of %
Tp1 = "I am % s" % "aaa "#Tp2 = "I am % s age % d" % ("alex", 18) # sequential AssociationTp3 = "I am % (name) s age % (age) d" % {"name": "alex", "age": 18} # specify the name a
Data Structure BASICS (1): Data Structure Basics
Simple implementation of Swap
// C language (by-pointer): template
// C ++ special method (by-reference): template
Summary:
Although we have implemented swap by ourselves, we recommend that you use the std: swap () function that has been implemented by C ++ STL. It is stored in the namespace std, use the following
Bubble-Sort)
Algorithm idea:
Scan data
Data Structure BASICS (12) and data structure basics 12
Features of two-way linked list operation:
(1) "query" is the same as a single-chain table;
(2) When "insert" and "delete", you must modify the pointer in both directions.
However, for a two-way cyclic linked list, inserting at the end of the table is very fast. It only takes O (1) time, because there is a pointer to the front, therefore, the two-way c
Data Structure BASICS (6): Data Structure Basics
Stack is a linear table that only allows insert or delete operations at one end. It features: first-in-first-out (FILO)/Second-in-first-out (LIFO );
Stack VS. Queue
The stack and queue are both dynamic sets, but in the stack, you can remove the recently inserted one: the stack implements a kind of "last-in, first-out) similarly, in the queue, the elements th
Data Structure BASICS (7): Data Structure Basics
Queue
A queue is also a linear table with limited operations. It can be inserted only at one end of the table and deleted at the other end of the table. it is characterized by "first-in-first-out (FIFO)", which is also known as the first-out linear table, simple queue:
Cyclic queue
There is an inherent deficiency in the ordered queue, that is, the space uti
Data Structure BASICS (4): Data Structure Basics
Fast sorting is the most popular and the fastest Sorting Algorithm (C ++ STL's sort function is to implement fast sorting); quick sorting) it is an improvement for Bubble sorting. Proposed by C. A. R. Hoare in 1962. Its basic idea is: Split the data to be sorted into two independent parts by one sort, and all the data in one part is smaller than all the data
MongoDB BASICS (9) sharding and mongodb Basics
Sharding stores data on multiple servers. Mongodb uses sharding to support deployment of very large datasets and high throughput operations. The capabilities of a single server are limited in various aspects, such as CPU, IO, RAM, and storage space. To solve the expansion problem, the database provides two methods: vertical expansion and sharding.
Vertical Sc
Lua basics [5] I/O file operations, lua Basics
-- [Lua file operation-related I/O] ---- You can specify to open a file in a specific directory. If the file does not exist, -- lua will help us create this file under the directory you specified, provided that the directory exists -- [we should also master the file writing mode; the following write mode is described: "r" Mode: Read mode (In this mode, only con
Java syntax BASICS (Summary), java syntax basics Summary
1. Keywords: words with special meanings given by a language.
Reserved Words: Actually, words that have not been given a special meaning but will be used in the future.
2. identifier: it is actually a custom term in the program. For example, class name, variable name, and function name. Contains 0-9, a-z, $, and ,_;
Note:
1), cannot begin with a numbe
Linux basics [Article 9] and linux basics Article 9
Architecture of adding three disks to the server
Note:
1. linux caches the physical memory that is not used by the system. Therefore, 859 is not the actual memory of the system.
2. The real available system memory is 921.
3. buffers is the write buffer, and sync writes the buffer data to the disk.
4. the cache is the buffer for reading data.
5. The hard
Linux BASICS (1), Linux BASICS (
1. Five methods available for installing linux
1. CD2. Hard Disk3. NFS Image4. FTP5. HTTP
There are two scenarios for hard disk installation:
A. It is installed on Win System
B. The installation is started from other Linux
This section describes how to install Windows in most people. The second method has not been called.
1. Install the system --- RedHat 9.0, (similar to tho
TCP/IP BASICS (I), tcpip Basics
1. Architecture and main protocols of TCP/IP protocol family
The TCP/IP protocol family is a layer-4 protocol system.
Data link layer: implements network drivers for Nic interfaces to process data transmission on physical media (such as Ethernet and Token network. The two common protocols on the data link layer are ARP (Address Resolve Protocol) and RARP (Revers Address Reso
Oracle BASICS (1), Oracle BASICS (
Oracle Database System is a group of software products with distributed databases as the core provided by Oracle in the United States. It is currently the most popular Client/Server) or one of the databases in the B/S architecture. For example, Oracle database is the most widely used database management system in the world. As a common database, it has complete data manage
[Java Basics] common knowledge accumulation (1), java basics Accumulation
1. Difference Between = and equals: difference between null and ""
2. 15 top-level Java multi-thread Interview Questions and answers
(1) Use of join in a thread
In many cases, the main thread generates and starts a subthread. If a large number of time-consuming operations are required in the subthread, the main thread usually ends bef
Powerful JQuery (1)-basics, jquery-Basics
JQuery is an excellent Javascript framework and a lightweight js library. Using jQuery will greatly improve the efficiency of writing javascript code and make the written code more elegant and robust.
After learning jquery, We are equivalent to the shoulders of giants.
I will introduce jquery in three blogs. This blog will introduce jquery's basic syntax, intelligen
Linux BASICS (6) and linux Basics
I. Samba Service
The Samba service is mainly used to share files with Windows users on Linux servers.
Perform the following five steps to configure the server:
1. Prepare the environment
1) disable the firewall systemctl stop firewalld
2) temporarily disable selinux sentenforce 0
Or disable selinux permanently in the configuration file.
Vim/etc/sysconfig/selinux = disabled
Java syntax basics 1: java syntax Basics
Basic Java code format
All program code in Java must exist in a class. class is defined using the class keyword. Some modifiers can be provided before the class. The format is as follows:
Modifier class Name
{
Program code
}
Note:
1. Java is strictCase Sensitive.
2. A continuous string in a Java program cannot be written in two separate rows.
Java program comments
T
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.