当前位置:网站首页>Tencent internship interview sorting
Tencent internship interview sorting
2022-07-03 14:50:00 【III VII】
come from : Tencent interview
one side
Linux Instruction how to check the memory occupation , How to check the occupied port
top
lsof
An array a[20][10] The first address of 100, ask a[11][5] What is the address of
As indicated in the question , Its representatives a[0][0] The address for 100;
So for 100+11410+5*4=560;
Memory storage and insertion of arrays and linked lists
Array storage is continuous , Convenient query , But it is inconvenient to insert ;
Linked list storage is not continuous , It's not convenient to inquire , But easy to insert ;
unordered_map and map The underlying implementation of , And how to choose the usage scenario
unorde_map Implementation based on hash table ;
map Based on black mangrove ;
#include when “” and <> The difference between
#include<>: The compiler looks for the header file directly from the system class library directory :
#include"": Find the project header from the default directory , Current project directory , It is the project engineering document (.vcxproj) directory . If the search fails under the current directory of the project , Then find the header file from the header file reference directory of the project configuration , The reference directory of the so-called project configuration , It is the header file reference directory we set in the project . If the search still fails in the header file reference directory of the project configuration , Then look for the header file from the system class library directory
vector When adding elements , Memory changes and push_back Pointer is used 、 Reference or copy
size()++;
capacity unchanged ;
If it exceeds, allocate 1.5 perhaps 2 Times the size of memory ;
Push_back Copy is used , Class also uses copy
TCP/UDP The difference between
- Whether it's connection oriented
- reliable
- Whether it supports one to many
- Consumed resource size ,
- Head length
TCP How to ensure its reliability
- The checksum
- flow control ( Face two ports )、 Congestion control
- Serial number and confirmation of receipt ;
- Three handshakes, four waves ;
- Over time retransmission
Interprocess communication method
- The Conduit
- Shared memory
- Message queue
- The signal
- Semaphore
- socket Socket
socket Compared with other advantages
Processes on different hosts can communicate ;
The transmission data is byte level , Transfer data can be customized , Small amount of data ( For mobile applications : Low cost )
Short data transmission time , High performance
It is suitable for real-time information interaction between client and server
Can encrypt , Strong data security
Write Bytes next time , That's all for this time 23333
边栏推荐
- 论文分享:Generating Playful Palettes from Images
- Fundamentals of PHP deserialization
- Zzuli:1058 solving inequalities
- Puzzle (016.4) domino effect
- Déformation de la chaîne bm83 de niuke (conversion de cas, inversion de chaîne, remplacement de chaîne)
- Code writing and playing method of tonybot humanoid robot at fixed distance
- Zzuli:1057 prime number determination
- 【7.3】146. LRU缓存机制
- Joomla! CMS 3.0~3.4.6 RCE
- CentOS7部署哨兵Redis(带架构图,清晰易懂)
猜你喜欢
![[graphics] real shading in Unreal Engine 4](/img/8d/53775c7570c5578f4fe985592bb305.jpg)
[graphics] real shading in Unreal Engine 4

How to query the baby category of tmall on Taobao
![[engine development] rendering architecture and advanced graphics programming](/img/a4/3526a4e0f68e49c1aa5ce23b578781.jpg)
[engine development] rendering architecture and advanced graphics programming

PS tips - draw green earth with a brush
![[qingniaochangping campus of Peking University] in the Internet industry, which positions are more popular as they get older?](/img/f6/fe61c84f289f0e74a45946dac687a6.jpg)
[qingniaochangping campus of Peking University] in the Internet industry, which positions are more popular as they get older?

B2020 分糖果

复合类型(自定义类型)

C string format (decimal point retention / decimal conversion, etc.)

基因家族特征分析 - 染色体定位分析

Analysis of gene family characteristics - chromosome location analysis
随机推荐
Zzuli:1056 lucky numbers
[engine development] in depth GPU and rendering optimization (basic)
On MEM series functions of C language
Luogu p3065 [usaco12dec]first! G problem solution
Zzuli:1058 solving inequalities
[opengl] face pinching system
Amazon, express, lazada, shopee, eBay, wish, Wal Mart, Alibaba international, meikeduo and other cross-border e-commerce platforms evaluate how Ziyang account can seize traffic by using products in th
Open under vs2019 UI file QT designer flash back problem
Puzzle (016.4) domino effect
Yolov5进阶之七目标追踪最新环境搭建(二)
[opengl] geometry shader
Sub GHz wireless solution Z-Wave 800 Series zg23 SOC and zgm230s modules
C language DUP function
【7.3】146. LRU caching mechanism
Zzuli:1046 product of odd numbers
链表有环,快慢指针走3步可以吗
Dllexport and dllimport
C # realizes the login interface, and the password asterisk is displayed (hide the input password)
556. 下一个更大元素 III : 简单构造模拟题
[combinatorics] permutation and combination (set combination, one-to-one correspondence model analysis example)