• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ArgenBarbie
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页
2016年4月21日
208. Implement Trie (Prefix Tree) -- 键树
摘要: Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. 阅读全文
posted @ 2016-04-21 14:52 ArgenBarbie 阅读(178) 评论(0) 推荐(0)
173. Binary Search Tree Iterator -- 迭代器
摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2016-04-21 13:11 ArgenBarbie 阅读(125) 评论(0) 推荐(0)
124. Binary Tree Maximum Path Sum *HARD* -- 二叉树中节点和最大的路径的节点和
摘要: Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node in th 阅读全文
posted @ 2016-04-21 11:15 ArgenBarbie 阅读(170) 评论(0) 推荐(0)
114. Flatten Binary Tree to Linked List -- 将二叉树转成链表(in-place单枝树)
摘要: Given a binary tree, flatten it to a linked list in-place. For example,Given The flattened tree should look like: If you notice carefully in the flatt 阅读全文
posted @ 2016-04-21 10:53 ArgenBarbie 阅读(173) 评论(0) 推荐(0)
108. Convert Sorted Array to Binary Search Tree 109. Convert Sorted List to Binary Search Tree -- 将有序数组或有序链表转成平衡二叉排序树
摘要: 108. Convert Sorted Array to Binary Search Tree Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 109. 阅读全文
posted @ 2016-04-21 10:14 ArgenBarbie 阅读(171) 评论(0) 推荐(0)
2016年4月20日
101. Symmetric Tree -- 判断树结构是否对称
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: But the fol 阅读全文
posted @ 2016-04-20 11:10 ArgenBarbie 阅读(447) 评论(0) 推荐(0)
99. Recover Binary Search Tree -- 找到二叉排序树中交换过位置的两个节点
摘要: Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note:A solution using O(n) space i 阅读全文
posted @ 2016-04-20 10:54 ArgenBarbie 阅读(339) 评论(0) 推荐(0)
malloc的实现
摘要: http://blog.jobbole.com/75656/ 原型:void* malloc(size_t size); 功能:在系统中分配一段连续的可用的内存。 要求: malloc分配的内存大小至少为size参数所指定的字节数 malloc的返回值是一个指针,指向一段可用内存的起始地址 多次调用 阅读全文
posted @ 2016-04-20 10:01 ArgenBarbie 阅读(365) 评论(0) 推荐(0)
97. Interleaving String *HARD* -- 判断s3是否为s1和s2交叉得到的字符串
摘要: Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = "aabcc",s2 = "dbbca", When s3 = "aadbbcbcac", ret 阅读全文
posted @ 2016-04-20 00:02 ArgenBarbie 阅读(296) 评论(0) 推荐(0)
2016年4月19日
追寻伯利恒二叉树 -- 不用栈不用递归
摘要: http://www.acmerblog.com/inorder-tree-traversal-without-recursion-and-without-stack-5988.html 用叶子节点的空指针来记录当前节点的位置,然后一旦遍历到了叶子节点,发现叶子节点的右指针指向的是当前节点,那么就认 阅读全文
posted @ 2016-04-19 15:34 ArgenBarbie 阅读(361) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3