当前位置:网站首页>2022 ARTS|Week 23
2022 ARTS|Week 23
2022-06-12 12:44:00 【InfoQ】
1. Algorithm
Algorithm title
Code
class Solution:
def getLeastNumbers(self, arr: List[int], k: int) -> List[int]:
def quick_sort(arr, l, r):
# The length of the subarray is 1 Stop recursion
if l >= r: return
# Sentinel division operation ( With arr[l] As a benchmark )
i, j = l, r
while i < j:
while i < j and arr[j] >= arr[l]: j -= 1
while i < j and arr[i] <= arr[l]: i += 1
arr[i], arr[j] = arr[j], arr[i]
arr[l], arr[i] = arr[i], arr[l]
# Recursive left ( Right ) Subarray performs sentinel partitioning
quick_sort(arr, l, i - 1)
quick_sort(arr, i + 1, r)
quick_sort(arr, 0, len(arr) - 1)
return arr[:k]
2. Review
My comments
- A simple operational record of the article , It involves npm and Dockerfile Related content of , The technical level is not deep .
- Traefik It is also a relatively simple way to use ,V2.7 Version of , It is a relatively simple configuration method .
- On foreigners' websites , In fact, I have seen similar articles many times , But I think it is very simple , It's not worth writing at all
- See beforeSu Yang blogArticles on , It is also very touching . It is for NAS—— Synology DS920+ The twists and turns of , There are many services installed on it , such as Wiki wait . Use at the same time Traefik Load balancing and reverse proxy etc .
3. Tip
The article links
- Vim Philosophy of ( One )
- Vim Philosophy of ( Two )
- Vim Philosophy of ( 3、 ... and )
- Vim Philosophy of ( Four )
- VIM Online reading version of Chinese documents
skill
set nocompatible " Don't vi compatible
set t_RV= " remaining problems
set runtimepath=$VIMRUNTIME " Close user-defined scripts
syntax on " Turn on syntax highlighting
filetype on " Turn on file type detection
filetype indent on " Open indent rule
set nobackup " Turn off backup
set novisualbell " Turn off the visual bell
set visualbell t_vb= " ditto
set ruler " Display scale
set number " According to the line Numbers
set showcmd " Show incomplete instruction input
set showmode " Show current mode
set scrolloff=3 " Rolling distance
set backspace=indent,eol,start
set showmatch " Highlight the matching brackets
set matchtime=1
set hlsearch " Turn on highlight search mode
set incsearch " Open incremental search mode
set ignorecase " Ignore case
set smartcase " Smart search mode
set expandtab "tab to space
set smarttab
set autoindent " Turn on auto indent
set smartindent
set shiftround
set shiftwidth=4
set tabstop=2
set softtabstop=2
set list listchars=eol:¬,tab:▸\ ,trail:., " Echo of special symbols
set background=dark
"colorscheme darkblue
" Make comments and special characters look better
highlight Comment ctermfg=245 guifg=#8a8a8a
highlight NonText ctermfg=240 guifg=#585858
highlight SpecialKey ctermfg=240 guifg=#585858
My study
- vim -u ~/.vimrc.basic You can use a specific vim The configuration file
- The author's dynamic demonstration is very good , Used to LICEcap You know , Make one that meets the requirements gif Documentation is quite difficult .
4. Share
My study
- The latest definition iterated on the Internet is :Web3 It is a decentralized online network based on blockchain .
- To revolutionize Web3 One of the main reasons for the change is to build a new Internet focusing on decentralization .
- De centralization : Architecture decentralization ,“ Control and control ” De centralization , Logical decentralization .
- Web3 stay NFT Development 、 Metauniverse and even cryptocurrency have played an important role .
- People who followed before : Zhang Xiaoyu 、 Fan Bing, the growth hacker 、 Guoyu et al , All began to pay constant attention to Web3, Even said , Those in the Web2 People who don't get dividends in the times , It's better to pay attention to Web3 Well .
- See before@ Middle two monsterweibo , I suggest you register for the new year metamask My wallet , Although I don't know how to use and specific functions , But I did , Also learned some relevant information . Explain that you are involved , You can leave yourself a place to continue to pay attention to 「 chance 」, The next step is to continue to pay attention to Web3 and NFT wait .



边栏推荐
- Micro task, macro task and event loop of JS
- Advanced C language -- storage of floating point in memory
- 机械臂雅可比矩阵IK
- Native JS implements the copy text function
- C语言进阶篇——万字详解指针和qsort函数
- Buu question brushing record - 6
- Binary tree (serialization)
- Matlab install license manager error -8
- WebStorage
- itk itk::BSplineDeformableTransform
猜你喜欢

Video speed doubling in PC browser

SWI-Prolog的下载与使用

八大误区,逐个击破(2):性能差?应用程序少?你对云的这些担心很多余!

Rust language learning

Microsoft Word 教程,如何在 Word 中插入页眉或页脚?

Invalid date of moment conversion timestamp

一个ES设置操作引发的“血案”

Matlab install license manager error -8

Numpy numerical calculation basis

MUI登录数据库完善与AJAX异步处理【MUI+Flask+MongoDB+HBuilderX】
随机推荐
this.$ How to solve the problem when refs is undefined?
C语言进阶篇——深度解剖数据在内存中的存储(配练习)
八大误区,逐个击破(2):性能差?应用程序少?你对云的这些担心很多余!
什么时候运用二分搜索
三维坐标点拟合球(matlab and C )
itk itk::BSplineDeformableTransform
This direction of ordinary function and arrow function
功能标记是什么?一文了解它的作用,以及它的最佳实践
JS method of exporting DOM as picture
牛顿法解多项式的根
【VIM】.vimrc配置,已经安装Vundle,YoucompleteMe
El select data echo, display only value but not label
Brush questions [de1ctf 2019]shellshellshell
分享PDF高清版,系列篇
itk itk::BSplineDeformableTransform
【C语言】关键字static&&多文件&&猜字游戏
Safety KNN
一个ES设置操作引发的“血案”
Part of the fourth Zhejiang CTF finals
22年gdcpc广东省赛记录