02 2018 档案
AVL Tree Deletion
摘要:Overview 知识点: 1. delete函数的signature public AVLTreeNode Delete(AVLTreeNode node, int key) 3. 旋转: 左旋和右旋逻辑和插入是一致的。 Source Code 阅读全文
posted @ 2018-02-26 05:46 xuyanran 阅读(340) 评论(0) 推荐(0) 编辑
Deepest left leaf node in a binary tree
摘要:Recursion Recursion Design Data Structure Source Code Complexity Time complexity is O(N) Space complexity is O(N) 阅读全文
posted @ 2018-02-26 05:27 xuyanran 阅读(107) 评论(0) 推荐(0) 编辑
二叉搜索树(BST)的插入和删除递归实现
摘要:思路 二叉搜索树的插入 TreeNode InsertRec(rootNode, key) = if rootNode == NULL, return new Node(key) if key >= rootNode.data, rootNode.rightChild = InsertRec(roo 阅读全文
posted @ 2018-02-25 10:45 xuyanran 阅读(366) 评论(0) 推荐(0) 编辑
AVL Tree Insertion
摘要:Overview AVL tree is a special binary search tree, by definition, any node, its left tree height and right tree height difference is not more than 1. 阅读全文
posted @ 2018-02-20 03:22 xuyanran 阅读(239) 评论(0) 推荐(0) 编辑
.Net memory management Learning Notes
摘要:Managed Heaps In general it can be categorized into 1) SOH and 2) LOH. size lower than 85K will be in SOH, size larger than 85K will be in LOH. Small 阅读全文
posted @ 2018-02-19 05:05 xuyanran 阅读(161) 评论(0) 推荐(0) 编辑
Heap Sort - recursion
摘要:Heap Sort Heapify Heapify(array, n, i) = 1) compare node[i] with children 2)node[i] is already the largest one, no op. 3) child is largest one, swap, 阅读全文
posted @ 2018-02-05 03:21 xuyanran 阅读(154) 评论(0) 推荐(0) 编辑