当前位置:网站首页>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
边栏推荐
- 钉钉对话框文子转换成图片 不能复制粘贴到文档上
- Delete blank pages in word documents
- Unity基础(3)—— unity中的各种坐标系
- OpenCV环境搭建
- 用 ZEGO Avatar 做一个虚拟人|虚拟主播直播解决方案
- Detailed comparison of break and continue functions
- 央企建筑企业数字化转型核心特征是什么?
- Tower of Hanoi classic recursion problem (C language implementation)
- Shell string segmentation
- Pyqt5 learning pit encounter and pit drainage (1) unable to open designer.exe
猜你喜欢

使用更灵活、更方便的罗氏线圈

Use of construction methods

ssm整合增删改查

Several simple and difficult OJ problems with sequential force deduction

img 响应式图片的实现(含srcset属性、sizes属性的使用方法,设备像素比详解)

Tower of Hanoi classic recursion problem (C language implementation)

MySQL - clustered index and secondary index

MySQL - deep parsing of MySQL index data structure

6. Pytest generates an allure Report

GCC基础知识
随机推荐
Go面向并发的内存模型
【Express连接MySQL数据库】
Deploy Jenkins using containers
[c language] use the reverse order output of the linked list (bidirectional linked list)
网络之以太网
i++与++i详解
Install the gym corresponding to mujoco in the spinning up tutorial, and the error mjpro150 is reported
STL source code analysis (Hou Jie) notes - STL overview
Delete blank pages in word documents
Whether the modification of import and export values by ES6 and commonjs affects the original module
钉钉对话框文子转换成图片 不能复制粘贴到文档上
mujoco和mujoco_py安装以及解决libXcursor.so.1:NO such dictionary
恒星科通邀您“湘”约第24届中国高速公路信息化大会暨技术产品展示会
Makefile+make Basics
LeetCode_ Stack topics
MySQL - 深入解析MySQL索引数据结构
Makefile(make)常见规则(二)
Mujoco and mujoco_ Install libxcursor.so 1:NO such dictionary
Laya中的A星寻路
spinning up安装完使用教程测试是否成功,出现Library“GLU“ not found和‘from pyglet.gl import *错误解决办法