当前位置:网站首页>IOS interview preparation - other articles
IOS interview preparation - other articles
2022-07-29 04:42:00 【smallcatlei】
iOS Interview preparation - ios piece
ios Interview preparation - objective-c piece
ios Interview preparation - Online
IOS Interview preparation - C++ piece
iOS Interview preparation - Other articles
Design patterns
Factory mode
The singleton pattern
Builder pattern
Use multiple objects to make a step-by-step type . Become a simple object . The design pattern of type belongs to the creation pattern , It provides the best way to create objects
One Builder Class will construct the final object step by step . The Builder Class is independent of other objects .
Adapter pattern
As a bridge between two incompatible interfaces . This type of design pattern belongs to structural pattern , It combines the functions of two independent interfaces .
Chain responsibility mode
Usually each recipient contains a reference to another recipient . If a recipient cannot process the request , Then it will send the same transmission request as the next sender , And so on .
Observer mode
One to many mode , When an object is modified , Objects that depend on it are automatically notified .
MVC and MVVM Pattern
MVC Pattern - View - controller . Controller control mode and view .
MVVM view viewMode mode . call chaining
Algorithm
java Common functions
Introduce the toolkit
import java.util.*;
list Turn array
String[] array2 = testList.toArray(new String[testList.size()]);
Array rotation list
ArrayList<String> arrayList = new ArrayList<String>(Arrays.asList(arrays));
Array copy
int[] arr = Arrays.copyOf(sourceArray, sourceArray.length);
int[] right = Arrays.copyOfRange(arr, middle, arr.length);
Quick sort
Objective-C Realization Quick sort :
https://blog.csdn.net/htwhtw123/article/details/125347823?spm=1001.2014.3001.5501
data structure
Trees
Binary search tree ( Binary sort tree , Binary search tree )
It could be an empty tree , Or a binary tree that has the following properties : If its left subtree is not empty , Then the value of all nodes in the left subtree is less than the value of its root node ; If its right subtree is not empty , Then the value of all nodes in the right subtree is greater than the value of its root node ; Its left 、 The right subtree is also a binary sort tree .
AVL Trees ( Balance tree )
A binary search tree , And the absolute value of the height difference between the left and right subtrees of each node ( Balance factor ) At most 1
The order of traversing the tree
The former sequence traversal Around the middle
In the sequence traversal Left middle right
Subsequent traversal Right and left
other
git Realization principle
Every time we run git add and git commit On command , Git The essential work is to save the rewritten file as a data object , Update the staging area , Record tree object , Finally, create a submission object that indicates the top-level tree object and the parent submission . These three main Git object —— Data objects 、 Tree object 、 Submit to —— Initially, they are kept in the form of separate files .git/objects Under the table of contents .
Git The core of is its object database , Which holds git The object of , The most important one is blob、tree and commit object ,blob Object realizes the recording of file content ,tree Object implements the file name 、 Record of file directory structure ,commit Object implements the version submission time 、 Version author 、 Version sequence 、 Records of additional information such as Version Description . These three types of objects , It's perfect git The basic function of : Record of version status .
Git Reference refers to git object hash Pointer like file of key value . adopt Git quote , We can more easily locate the submission of a certain version .Git Branch 、tags And other functions are based on Git Reference to the implementation of .
UNIX Common commands
| Instructions | meaning |
|---|---|
| cat | Display file contents |
| cd | Change the directory to the specified directory |
| ls | List the files under the current path |
| cp | Copy the source file to the destination |
| file | Determine the type of document |
| find | Find files |
| mkdir | Create directory |
| mv | Move ( rename ) file |
| pwd | Print current directory |
| rm | Delete file |
| rmdir | Delete folder |
| vim | open VIM Text editor |
| gzip | Compressed files .gz file |
| gunzip | Unzip the file |
User mode switches to kernel mode
trigger
system call
interrupt
abnormal
technological process
User mode can directly read and write registers , User mode operation CPU, Save the state of the register to the corresponding memory , Then call the corresponding system function , Pass in the corresponding user stack PC Address and register information , Convenient for subsequent kernel method calls , Restore the user method execution site
take CPU The field of is changed to kernel mode , Write the code address corresponding to the kernel segment to PC In the register , Then start executing kernel methods , The corresponding method stack frame is saved in the kernel stack .
When the kernel method is executed , Will CPU The field of is changed to user status , Then use the previously written information to recover the execution of the user stack
frame
SDWebImage
https://www.jianshu.com/p/e5d583e81ac0
MLeakFinder
YYModel
Setting and getting the value of the attribute are both through objc_msgSend Function implementation
边栏推荐
- Makefile+make Basics
- 用 ZEGO Avatar 做一个虚拟人|虚拟主播直播解决方案
- Review key points and data sorting of information metrology in the second semester of 2022 (teacher zhaorongying of Wuhan University)
- [C language] PTA 7-52 finding the sum of the first n terms of a simple interleaved sequence
- The most complete NLP Chinese and English stop words list in the whole station (including punctuation marks, which can be copied directly)
- Oracle insert data
- Dasctf2022.07 empowerment competition
- Flutter实战-请求封装(二)之dio
- EF core: one to one, many to many configuration
- 如何避免示波器电流探头损坏
猜你喜欢

The most complete NLP Chinese and English stop words list in the whole station (including punctuation marks, which can be copied directly)

String, array, generalized table (detailed)

恒星科通邀您“湘”约第24届中国高速公路信息化大会暨技术产品展示会

Redux quick start

Star a pathfinding in LAYA

Post export data, return

On quotation

正确的用户拖拽方式

Classes and objects (III)

Reveal安装配置调试
随机推荐
What is the use of meta-info?
使用近场探头和电流探头进行EMI干扰排查
Make a virtual human with zego avatar | virtual anchor live broadcast solution
img 响应式图片的实现(含srcset属性、sizes属性的使用方法,设备像素比详解)
Simply change the picture color
Detailed comparison of break and continue functions
Common current limiting methods
[c language] PTA 7-50 output Fahrenheit Celsius temperature conversion table
Vscode configuration makefile compilation
Flutter 手势监听和画板实现
带你一文理解JS数组
Dasctf2022.07 empowerment competition
Tower of Hanoi classic recursion problem (C language implementation)
Corresponding order of 18 and 25coco data of openpose and joint points
Go面向并发的内存模型
Mysql:The user specified as a definer (‘root‘@‘%‘) does not exist 的解决办法
Laya中的A星寻路
使用更灵活、更方便的罗氏线圈
C语言实现三子棋
Oracle 插入数据