m*****n 发帖数: 5245 | 1 ☆─────────────────────────────────────☆
china2008 (china2008) 于 (Wed Jan 30 00:57:47 2008) 提到:
下面两道题是我面试所遇, 纯属变态。
1. Know the pointer to the node, remove the node from a single linked list.
Will not give the header of the list. function prototype is
void remove (Node *node)
Hint:
copy key and next fields of the next node to current node, then delete next
node.
2. Have a Stack class, pop() and push() member function , want to implement
a Queue using the Stack class, Queue class should have E |
|