• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
xiaoba1203
记录leetcode之路
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2016年10月28日

leetcode 108 Convert Sorted Array to Binary Search Tree ----- java
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 给一个排好序的数组,然后求搜索二叉树 其实就是二分法,不难。 阅读全文
posted @ 2016-10-28 20:51 xiaoba1203 阅读(164) 评论(0) 推荐(0)
 
leetcode 107 Binary Tree Level Order Traversal II ----- java
摘要: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For 阅读全文
posted @ 2016-10-28 18:10 xiaoba1203 阅读(202) 评论(0) 推荐(0)
 
leetcode 106 Construct Binary Tree from Inorder and Postorder Traversal----- java
摘要: Given inorder and postorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. 和上一道题基本一样 根据 阅读全文
posted @ 2016-10-28 17:59 xiaoba1203 阅读(138) 评论(0) 推荐(0)
 
leetcode 105 Construct Binary Tree from Preorder and Inorder Traversal ----- java
摘要: Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. 给出前序遍历和中序遍历,然 阅读全文
posted @ 2016-10-28 17:35 xiaoba1203 阅读(355) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3