摘要: 二叉堆是一种特殊的堆,二叉堆是完全二元树(二叉树)或者是近似完全二元树(二叉树)。 二叉堆有两种:最大堆和最小堆。 最大堆:父结点的键值总是大于或等于任何一个子结点的键值; 最小堆:父结点的键值总是小于或等于任何一个子节点的键值。 二叉堆一般都通过"数组"来实现。数组实现的二叉堆,父节点和子节点的位 阅读全文
posted @ 2016-02-13 21:14 zhangbaochong 阅读(2795) 评论(0) 推荐(1) 编辑
摘要: 题目: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a l 阅读全文
posted @ 2016-02-13 19:06 zhangbaochong 阅读(270) 评论(0) 推荐(0) 编辑