2018-09-15 NetEase Interactive Entertainment Interview

Interviewed at a hotel in Chengdu Will update if I remember more

Written Test

Implement a hashmap using open addressing, with int as key and string as value, time limit 30 minutes

First Interview

  • Purpose and principles of volatile
  • Differences between dynamic_cast and static_cast
  • Issues with legal conversions between parent and child classes using dynamic_cast
  • Virtual destructors and vtables
  • RTTI (Run-Time Type Information) and type_info
  • Sizeof for structures
  • Characteristics of red-black trees; given approximately 12 numbers, provide a possible red-black tree result and draw it
  • API call process for establishing a server listen, how to implement non-blocking epoll
  • Principles of epoll, differences in business code logic between edge-triggered and level-triggered
  • TCP packet sticking (concatenation)
  • Throwing two eggs from a 100-story building to determine the egg’s hardness, dynamic programming solution method
  • 1 billion players, each with a score ranging from 0 to 100,000, how to determine a player’s ranking
  • Redis skip list
  • How memory barriers are implemented in assembly
  • Two things that every void func() assembly program needs to do at the beginning
  • How to determine the cause of a memory leak
  • How to print something before the main function. What other programs execute before the main function.

Second Interview

  • Differences between Python’s is and == operators, the id function
  • Differences between Python’s xrange and range
  • Python iterators
  • Redis ziplist
  • Redis TTL expiration implementation
  • STL deque implementation (I answered list, which was incorrect. Then asked how I would implement a deque)
  • What happens between running a program in shell and the program outputting “hello world”, in detail
  • Draw a typical memory layout for a Linux program
  • Can different threads access each other’s stack space?
  • A matrix of length x and width y, with holes at the four corners. A ball starts from a certain point and moves indefinitely without friction. Which hole will it enter?
  • What can be put inside the [] of a lambda expression, how do you think the compiler implements lambda expressions
  • What is an rvalue (I confused rvalue with rvalue reference here)
  • The implementation process of malloc, does malloc always call brk to adjust the heap boundary? Introduction to the buddy system
  • How do HTTPS clients and servers implement protocol selection, what are the commonly used protocols now
  • The process of client verification of the server in HTTPS
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy