Prefix and brush question summary of leetcode 2
Prefix and brush question summary of leetcode 2
1 - region and retrieval - array immutable Title Link: Title Link stamp here!!!
Idea: simple prefix sum. During initialization, use the sum array to store the prefix sum of the num array, and then calculate the interval sum from left to right in the num array, which can be obtained directly from ...
Added by DamianTV on Sun, 20 Feb 2022 20:03:37 +0200
In the Java language, will finally be executed?
brief introduction
we all know that finally, as a part of exception handling, it can only be followed by a statement block immediately after the try/catch statement, indicating that this statement will be executed in the end "under normal circumstances" (whether there is an exception thrown or not), which is often used w ...
Added by lance1208 on Sun, 20 Feb 2022 19:54:54 +0200
04Python Syntax - Basic Data Type - String
String Assignment
Single quotation mark assignment
a = 'this is a string'
print(a) # this is a string```
Double Quote Assignment
a = "this is a string"
print(a) # this is a string
Assignment of a three-quote string to a variable (multiple lines)
Retains the newline format of the string
# Triple Form
a = '''this is
a string'''
prin ...
Added by gabrielserban on Sun, 20 Feb 2022 19:53:44 +0200
In the PyCharm, the function encapsulates the code and calls it in JupyterNoteBook - take the KNN algorithm as an example (K nearest neighbor algorithm).
1. Main content of the article
This blog is devoted to explaining the skills to encapsulate code in PyCharm and invoke it in JupyterNoteBook. Through the learning of this blog, taking KNN algorithm as an example, it is intended to grasp the skills of functional code in plain language. It takes about 5 minutes to read this blog. Note: the c ...
Added by adeelahmad on Sun, 20 Feb 2022 19:51:00 +0200
Weekend homework - circular exercises
***
Output 'hello world', input input, output print print('hello world')
Define variables, variable names and identifiers, which are composed of letters, numbers or underscores, and numbers cannot start. Variables cannot be named with keywords. Keywords - some identifiers with special functions or special meanings in python. a = 15 print(a ...
Added by jordan on Sun, 20 Feb 2022 19:47:28 +0200
The sub query of MySQL learning notes is the sub query after the keywords select, from, where and exists
1, Meaning of subquery
Meaning: select statements that appear in other statements are called subqueries or intra queries; The external query statement is called primary query or external query Classification:
According to the location of sub query: After select: only scalar subqueries are supported After from: only table subqueries are ...
Added by sullyman on Sun, 20 Feb 2022 19:44:44 +0200
7-1: IO stream of C + +
1: Input and output of C language and C++ IO stream
In C language, there are three groups of input and output functions that we often use
Input / outputOperation objectprintf/scanfConsolefprintf/fscanffilesprintf/sscanfCharacter array (buffer)
The corresponding operations in C + + are as follows
Input / outputOperation objectostream/isr ...
Added by spramod on Sun, 20 Feb 2022 19:37:03 +0200
Introduction and use of axios
brief introduction
This paper mainly explains the concept and basic use of axios.
axios is currently one of the most popular ajax wrapper libraries for making it easy to send ajax requests.
Supported functions:
Issue an XMLHttpRequests request from the browser.From node.js makes an http request.Supports the Promise API.Ability to intercept ...
Added by keyboard on Sun, 20 Feb 2022 19:35:40 +0200
Data structure (C language version) -- sorting notes
1. Basic concepts of sorting
Sorting is an operation often carried out in the computer. Its purpose is to adjust a group of "unordered" record sequences to "ordered" record sequences. The purpose of sorting is to facilitate searching.
If the whole sorting process can be completed without accessing external memory, th ...
Added by zoidberg on Sun, 20 Feb 2022 19:35:22 +0200
[JS basic review] scope, this, closure
ScopeA scope is the accessibility of variables, functions, and objects in certain parts of the runtime code. In other words, the scope determines the visibility of variables and other resources in the code block.function foo() {
var a = 1
}
foo()
console.log(a) // Uncaught ReferenceError: inVariable is not definedThe above example can be un ...
Added by fortnox007 on Sun, 20 Feb 2022 19:32:53 +0200