M$ screening coding题2道# JobHunting - 待字闺中
i*1
1 楼
因为没有什么保密协议就直接粘贴了...
如果有人认为不妥 麻烦联系
1. Implement a thread-safe circular queue of integers of user-specified size using a simple array. Provide
routines to initialize(), enqueue() and dequeue() the queue.
The solution should include a set of test functions that verify the queue is thread-safe.
2. Implement an RAII wrapper class for Win32 handles. The class should be
able to accept a handle from any Win32 function that returns a handle (CreateFile,
CreateThread, etc.). The class should allow copying and assignment.
The solution should include a set of unit tests that verify the operation of the class.
如果有人认为不妥 麻烦联系
1. Implement a thread-safe circular queue of integers of user-specified size using a simple array. Provide
routines to initialize(), enqueue() and dequeue() the queue.
The solution should include a set of test functions that verify the queue is thread-safe.
2. Implement an RAII wrapper class for Win32 handles. The class should be
able to accept a handle from any Win32 function that returns a handle (CreateFile,
CreateThread, etc.). The class should allow copying and assignment.
The solution should include a set of unit tests that verify the operation of the class.