- 博客(4)
- 收藏
- 关注
原创 Exchange Nodes
Problem: Exchange the odd and even nodes in a linked list.Given a "head" pointer to a linked list. You are asked to write a C/C++ function to exchange the odd and even nodes in the linked list. For ex
2005-10-22 08:50:00 773
原创 Partially Revert Linked List
Problem: partially revert a linked listGiven a HEAD pointer to a linked list and an OFFSET pointer pointing to a node in the linked list. You are asked to write a C/C++ subroutine to revert the part o
2005-10-22 08:48:00 770
原创 Find Common Ancestor
Problem: find the common ancestor of two nodes in a treeGiven a "tree" pointer pointing to the root node of a tree and the other two pointers to two nodes in the tree. You are expected to write a C++
2005-10-22 08:46:00 853
原创 重温C++之虚拟析构函数
虚拟函数的引入是为了实现多态性(polymorphism),而虚拟析构函数是怎么实现多态性的?我想通过以下例子进行说明。#include using namespace std;class employee{public: employee(){ cout } ~employee(){ cout }};class programmer: public employee{public: pr
2005-10-22 08:35:00 905
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人