当前位置:网站首页>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
边栏推荐
- Install the gym corresponding to mujoco in the spinning up tutorial, and the error mjpro150 is reported
- Ethernet of network
- Exception resolution: error of not finding edu.stanford.nlp.semgraph.semgrex.semgrexpattern in cococaption package
- C语言实现三子棋
- [QT learning notes] * insert pictures in the window
- Classes and objects (I)
- Correct user dragging method
- 论pyscript使用感想(实现office预览)
- Pytoch automatic mixing accuracy (AMP) training
- oracle 更新和删除数据
猜你喜欢

Hengxing Ketong invites you to the 24th China expressway informatization conference and technical product exhibition in Hunan

Detailed comparison of break and continue functions

LeetCode_ Stack topics

redux快速上手

Unity基础(3)—— unity中的各种坐标系

Redux quick start

File operation (Advanced C language)

命令行交互工具(最新版) inquirer 实用教程

(heap sort) heap sort is super detailed, I don't believe you can't (C language code implementation)

6. Pytest generates an allure Report
随机推荐
Exception handling: pyemd or pyemd not found
[c language] PTA 7-51 sum the first n terms of odd part sequence
[c language] use the reverse order output of the linked list (bidirectional linked list)
Detailed comparison of break and continue functions
[C language] power table of 3 generated by PTA 7-53
使用更灵活、更方便的罗氏线圈
MySQL - 深入解析MySQL索引数据结构
正确的用户拖拽方式
ios面试准备 - objective-c篇
Correct user dragging method
Vscode one click compilation and debugging
Definition and implementation of stack and queue (detailed)
网络之以太网
Go面向并发的内存模型
Google browser opens the web page and out of memory appears
Software test interview questions (4)
Shell string segmentation
redux快速上手
命令行交互工具(最新版) inquirer 实用教程
How to build a mobile studio network?