2015年7月16日

按层次遍历二叉树

摘要: 编写按层次顺序(同一层自左至右)遍历二叉树的算法。#include "stdafx.h"#include #include using namespace std;struct BiNOde{ int ele; BiNOde* lnode; BiNOde* rnode;};vector>aa... 阅读全文

posted @ 2015-07-16 22:29 moffis 阅读(436) 评论(0) 推荐(0) 编辑

交叉链表

摘要: 两个单向链表,找出它们的第一个公共结点。链表的结点定义为:struct ListNode{ int m_nKey; ListNode* m_pNext;};#include "stdafx.h"#include#includeusing namespace std;struct List... 阅读全文

posted @ 2015-07-16 18:49 moffis 阅读(484) 评论(0) 推荐(0) 编辑

导航