Programmer's written examination of Bilibili 2021 back-end development multiple choice questions collection (5)

1. The time complexity of the following function is
void func(int x,int y,int z){ if(x<=0) print("%d,%d\n",y,z); else{ func( x-1,y+1,z); func(x-1,y,z+1); } } AO( x 2 x^2







x2 *y 2 y ^ 2and2 )
BO (2 x 2 ^ x2x)
C.O( 2 x 2^x 2x *2 y 2 ^ y2y *2 of 2 ^ z2z)
D.O(xyz)

2. The following regular expression cannot completely match the string aabbb is
Aa{2}b{3}
B.a+b+c*
C.[az]*
D.a+b?

3. Regarding the concept of Redis, what is wrong in the following description is that
A. Redis stores data in the hard disk in the form of key-value pairs, and all its keys are string types.
B. Redis values ​​support multiple data types, including Strings, hashes, lists, sets, ordered sets, etc.
C.Redis provides commands for operations on values, such as intersection, union, difference, etc.
D.NoSQL is a database other than relational databases Collectively, Redis is a NoSQL database

4. The largest number in the following hexadecimal numbers is
A. (227) 8
B. (96) 8
C. (143) 5
D. (10010101) 2

5. The Linux isolation technology used at the bottom of
Docker is A.cgroup
B.inotify
C.socket
D.epoll

6. Which of the following devices work at the data link layer
A. Hub
B. Switch
C. Router
D. Repeater

7. What is not part of inter-process communication is
A. Semaphore
B. Thread local storage
C. Message queue
D. Shared memory

8. The following description of the kernel space and user space in Linux is wrong.
A. The program code can manually specify which space to run in.
B. User space cannot directly create a process.
C. The running space of user space and kernel space are isolated from each other.
D .user space cannot directly write to files

9. Knowing that the generator number is: G(x)=x^4+x+1, the information is 1101011111 and the CRC code is
A.111
B.11
C.101
D.10

10. A 16-bit integer with a value of 12. In a little-endian system, the value stored in the low-order byte is
A.0x00
B.0xc0
C.0x0B
D.0x0c

11. Now there is 1G data to be sorted, and only 1G memory is available for computing resources. Among the following sorting methods, the most likely performance problem is
A. Insertion sort
B. Merge sort
C. Quick sort
D. Heap sort

12. The result of pre-order traversal of a binary tree is ABDEFC, the result of middle-order traversal is DBEFAC, and the result of post-order traversal is
A.DFEBCA
B.BDFECA
C.DBFEAC
D.BDEFAC

13. The following http status code description is wrong:
A.304 redirect
B.403 no permission
C.505 server error
D.200 normal response

14. Which of the following is the fix for the CSRF vulnerability that can be executed
A. Filter single quotes or angle brackets
B. Add verification code verification in each request
C. Set the HttpOnly attribute of the cookie key field
D. Detect the same HTTP referer field area

15. Use the recursive method to quickly sort the sequence table. In the following description of the number of recursions, the correct one is
A. After each division, the longer partition can be processed first to reduce the number of recursions.
B. After each division, process the more Short partitions can reduce the number of recursions
C. The number of recursions has nothing to do with the processing order of the partitions obtained after each division
D. The number of recursions has nothing to do with the order of the initial data

16. The specific requirements of the coffee shop sales system are: when the coffee shop clerk sells coffee, he can add various ingredients according to the customer's requirements, and calculate the total price according to the price of the added ingredients. To design the system, which design mode should be used for design
A. Singleton mode
B. Prototype mode
C. Combination mode
D. Decoration mode

17. The network protocol that must not be involved in ping www.bilibili.com on the company LAN is
A.DNS
B.ICMP
C.RARP
D.UDP

18. Please choose the correct description
. A. Generally speaking, allocating memory on the heap is more efficient than allocating memory on the stack.
B. When the size of the memory to be allocated is known in advance, you can directly allocate memory on the stack, as long as it does not exceed The available memory size of the current operating system will always succeed
. C. Memory leak means that when program A applies for a piece of memory, it is possible that the operating system will give a piece of memory of program B to program A for use, and then return after program A ends. For program B, during the period of memory borrowing, program B has a memory leak
. D. Static variables and global variables are allocated at the beginning of the program. This part of the memory cannot be reclaimed until the end of the program.

19. Regarding the following SQL statement, the description is correct.
There are two tables Area and City data respectively:
Area

ID Name
1 North
2 South
3 East
4 West

City

ID Name AreaID
1 Beijing 1
2 Shanghai 2
3 Guangzhou 3
4 Shenzhen 4

Execute the following sql:
select * from City left join Area on City.AreaID = Area.ID where Area.ID>0 group by Area.ID having count(Region)>0 order by count(Region) desc limit1.
A. This statement In the order of execution, where will be executed first, then having, then order by, and finally limit
B. In the order of execution of the statement, from will be executed first, then join will be executed, and then where
C.select * from City left join Area on City will be executed . AreaID = Area.ID and select * from City inner join Area on City.AreaID = Area.ID The execution results of these two SQL statements are different
D. The SQL execution will form the Cartesian product of the City and Area tables.

20. A TCP connection is established between client C and server S. The maximum TCP segment length is 2KB, and the current congestion window of client C is 16KB. After sending two maximum segments to server S continuously, it successfully receives the server The first confirmation segment sent by S, the size of the receiving window announced in the confirmation segment is 8KB, then the maximum number of bytes that client C can also send to server S is
A.14KB
B.8KB
C.6KB
D.16KB

21. The following statement is correct is that
A. 200, 190, 150, 170, 180, 140, 155, 160, 165, 120 is a maximum heap
B. Before sorting, all the data to be sorted must be loaded into the memory
C. Given a set of inputs, a unique Huffman tree can be output
D. By first Sequence sequence, middle sequence sequence can restore the original appearance of the tree

22. In the LINUX kernel, creating a file operation can use
A.Open
B.Write
C.Create
D.Fopen

23. Which of the following functions best describes the data link layer of the OSI model is
A. Processing signal transmission through the medium
B. Providing an interface between the user and the network
C. Controlling the routing of messages through the network
D. Guarantee The correct order of the data, error-free and complete

24. In the data structure, the data structure can be logically divided into
A. Compact structure and non-compact structure
B. Internal structure and external structure
C. Linear structure and nonlinear structure
D. Dynamic structure and static structure

25. On a 64-bit machine, in the C code shown below, what are the sizes of sizeof(a) and sizeof(b) respectively
char a[10];
char * b = (char*)malloc(10*sizeof( char));
A.20 4
B.8 8
C.10 4
D.10 8

26. The four basic elements of the correct execution of database transactions do not include
A. Durability
B. Toughness
C. Consistency
D. Isolation

27. Among the following sorting algorithms, what are the sorting algorithms with an average time complexity of O(n^2)?
A. Bubble sort
B. Merge sort
C. Quick sort
D. Heap sort

28.
Among the following protocols, the distributed system consistency protocol is A.ICMP
B.RAFT
C.SCSI
D.OSPF

29. TCP socket function does not produce blocking is
A.Bind
B.Write
C.Read
D.Accept

30. Suppose a list is initialized as {2,9,5,4,8,1}. After the first bubble sorting, the list becomes
A.2,9,5,4,1,8
B.2 ,5,9,4,8,1
C.2,5,4,8,1,9
D.2,9,5,4,8,1

Guess you like

Origin blog.csdn.net/qq_34124009/article/details/107997444