• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ying_vincent
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 27 下一页
2014年3月29日
Data Structure Binary Tree: Convert a given tree to its Sum Tree
摘要: http://www.geeksforgeeks.org/convert-a-given-tree-to-sum-tree/ 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 struct node {11 int data;12 struct node *left, *right;13 node() : data(0), left(NULL), right(NULL) { }14 node... 阅读全文
posted @ 2014-03-29 03:22 ying_vincent 阅读(158) 评论(0) 推荐(0)
Data Structure Binary Tree: Populate Inorder Successor for all nodes
摘要: http://www.geeksforgeeks.org/populate-inorder-successor-for-all-nodes/ 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 struct node {11 int data;12 struct node *left, *right, *next;13 node() : data(0), left(NULL), right(NULL)... 阅读全文
posted @ 2014-03-29 03:09 ying_vincent 阅读(205) 评论(0) 推荐(0)
Data Structure Binary Tree: Connect nodes at same level using constant extra space
摘要: http://www.geeksforgeeks.org/connect-nodes-at-same-level-with-o1-extra-space/recursive: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 struct node {11 int data;12 struct node *left, *right, *next;13 node() : data(0), left(N... 阅读全文
posted @ 2014-03-29 02:50 ying_vincent 阅读(209) 评论(0) 推荐(0)
Data Structure Binary Tree: Check if a given Binary Tree is SumTree
摘要: http://www.geeksforgeeks.org/check-if-a-given-binary-tree-is-sumtree/ 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 struct node {11 int data;12 struct node *left, *right;13 node() : data(0), left(NULL), right(NULL) { }14 ... 阅读全文
posted @ 2014-03-29 01:52 ying_vincent 阅读(207) 评论(0) 推荐(0)
2014年3月28日
Data Structure Binary Tree: Construct Tree from given Inorder and Preorder traversals
摘要: http://www.geeksforgeeks.org/construct-tree-from-given-inorder-and-preorder-traversal/ 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 struct node {11 char data;12 struct node *left, *right;13 node() : data(0), left(NULL), r... 阅读全文
posted @ 2014-03-28 12:14 ying_vincent 阅读(219) 评论(0) 推荐(0)
Data Structure Binary Tree: Inorder Tree Traversal without recursion and without stack!
摘要: http://www.geeksforgeeks.org/inorder-tree-traversal-without-recursion-and-without-stack/ 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 struct node {11 int data;12 struct node *left, *right;13 node() : data(0), left(NULL), ... 阅读全文
posted @ 2014-03-28 10:55 ying_vincent 阅读(144) 评论(0) 推荐(0)
2014年3月27日
Data Structure Binary Tree: Inorder Tree Traversal without Recursion
摘要: http://www.geeksforgeeks.org/inorder-tree-traversal-without-recursion/ 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 struct node { 9 int data;10 struct node *left, *right;11 node() : data(0), left(NULL), right(NULL) { }12 node(int d) : data(d... 阅读全文
posted @ 2014-03-27 13:09 ying_vincent 阅读(146) 评论(0) 推荐(0)
Data Structure Binary Tree: How to determine if a binary tree is height-balanced?
摘要: http://www.geeksforgeeks.org/how-to-determine-if-a-binary-tree-is-balanced/ 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 struct node { 9 int data;10 struct node *left, *right;11 node() : data(0), left(NULL), right(NULL) { }12 node(int d) : d... 阅读全文
posted @ 2014-03-27 12:23 ying_vincent 阅读(168) 评论(0) 推荐(0)
Data Structure Binary Tree: Diameter of a Binary Tree
摘要: http://www.geeksforgeeks.org/diameter-of-a-binary-tree/ 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 struct node { 9 int data;10 struct node *left, *right;11 node() : data(0), left(NULL), right(NULL) { }12 node(int d) : data(d), left(NULL), ... 阅读全文
posted @ 2014-03-27 12:12 ying_vincent 阅读(144) 评论(0) 推荐(0)
Data Structure Binary Tree: Convert an arbitrary Binary Tree to a tree that holds Children Sum Property
摘要: http://www.geeksforgeeks.org/convert-an-arbitrary-binary-tree-to-a-tree-that-holds-children-sum-property/ 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 struct node { 9 int data;10 struct node *left, *right;11 node() : data(0), left(NULL), right(N... 阅读全文
posted @ 2014-03-27 10:40 ying_vincent 阅读(273) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 27 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3