当前位置:网站首页>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
边栏推荐
- Flutter 手势监听和画板实现
- On quotation
- UE 在场景或UMG中播放视频
- Oracle 插入数据
- Hengxing Ketong invites you to the 24th China expressway informatization conference and technical product exhibition in Hunan
- String, array, generalized table (detailed)
- Makefile+Make基础知识
- mpc5744p简介与OpenSDA固件更新
- Mysql:The user specified as a definer (‘root‘@‘%‘) does not exist 的解决办法
- Mujoco and mujoco_ Install libxcursor.so 1:NO such dictionary
猜你喜欢

JVM (heap and stack) memory allocation

Definition and implementation of stack and queue (detailed)

ios面试准备 - 网络篇

安装spinning up教程里与mujoco对应的gym,报错mjpro150

Several simple and difficult OJ problems with sequential force deduction

DASCTF2022.07赋能赛

如何避免示波器电流探头损坏

在线教育的推荐系统

Post export data, return

读懂 互联网巨头 【中台之战】 以及 中台 发展思维
随机推荐
[express connection to MySQL database]
Exception resolution: error of not finding edu.stanford.nlp.semgraph.semgrex.semgrexpattern in cococaption package
Use of construction methods
Pycharm reports an error when connecting to the virtual machine database
OpenCV环境搭建
After the spinning up installation is completed, use the tutorial to test whether it is successful. There are library "Glu" not found and 'from pyglet.gl import * error solutions
oracle 更新和删除数据
File operation (Advanced C language)
Unity Foundation (3) -- various coordinate systems in unity
Basic operation of queue
iOS面试准备 - 其他篇
谷歌浏览器 打开网页出现 out of memory
Integration of Nan causes in pytorch training model
UE 在场景或UMG中播放视频
6. Pytest generates an allure Report
MySQL - 深入解析MySQL索引数据结构
un7.28:redis客户端常用命令。
Oracle insert data
Pyqt5 learning pit encounter and pit drainage (2) buttons in qformlayout layout cannot be displayed
img 响应式图片的实现(含srcset属性、sizes属性的使用方法,设备像素比详解)