2019q1 Homework1 (lab0)
contributed by < wang0630
>
認真看作業要求,除了提及如何逐步達到要求,還需要進行:
- 改善程式效能
- 解釋自動評分系統運作的原理
- 提及 qtest 的行為和裡頭的技巧
還未達成符合預期目標,請繼續付出!
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
jserv
Goal
According to the pdf file, we need to implement the following core operations of queue:
- Create a queue
- Free all spaces allocated for the queue
- Insert a new node at the head of the queue
- Insert a new node at the tail of the queue
- Pop out the node at the head of the queue
- Return the number of nodes in the queue
Implementation
- Create a new queue:
- Free all spaces allocated for the queue:
- Insert a new node at the head of the queue:
- Insert a new node at the tail of the queue:
- Pop out the node at the head of the queue:
- Return the number of nodes in the queue:
- Reverse the queue:
- valgrind:
A analysis tool to discover the partial errors.
Useful flags:
--track-fds
: track open file fds
--leak-check
: track partial memory leak