码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
[LeetCode] 105. Construct Binary Tree from Preorder and Inorder Traversal 由先序和中序遍历建立二叉树
Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. For example, ...
分类:其他好文   时间:2018-10-03 21:54:52    阅读次数:120
常见算法汇总
binary search Python def binary_search(arr, item): low = 0 high = len(arr) 1 while low ...
分类:编程语言   时间:2018-10-03 21:42:37    阅读次数:185
【底层原理】数据库的最简单实现
所有应用软件之中,数据库可能是最复杂的。MySQL的手册有3000多页,PostgreSQL的手册有2000多页,Oracle的手册更是比它们相加还要厚。 但是,自己写一个最简单的数据库,做起来并不难。Reddit上面有一个帖子,只用了几百个字,就把原理讲清楚了。下面是我根据这个帖子整理的内容。 数 ...
分类:数据库   时间:2018-10-03 00:35:41    阅读次数:188
LeetCode - Serialize and Deserialize Binary Tree
无法直接传入int因为它是primitive type, changes made to it will not be visible outside the function scope. ...
分类:其他好文   时间:2018-10-02 18:00:26    阅读次数:147
leetcode235 - Lowest Common Ancestor of a Binary Search Tree - easy
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: ...
分类:其他好文   时间:2018-10-02 17:40:02    阅读次数:149
[leetcode]100.Same Tree
题目 Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally id ...
分类:其他好文   时间:2018-10-02 17:39:32    阅读次数:203
1044.Pre-post
题目描述: We are all familiar with pre-order, in-order and post-order traversals of binary trees. A common problem in data structure classes is to find th ...
分类:其他好文   时间:2018-10-02 17:38:26    阅读次数:144
67. Add Binary
Given two binary strings, return their sum (also a binary string). The input strings are both non empty and contains only characters 1 or 0. Example 1 ...
分类:其他好文   时间:2018-10-02 17:36:11    阅读次数:189
[LeetCode] 255. Verify Preorder Sequence in Binary Search Tree 验证二叉搜索树的先序序列
Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary search tree. You may assume each number in the seq ...
分类:其他好文   时间:2018-10-02 14:20:32    阅读次数:165
Java的操作数组的方法Arrays
一.toString()将数组的内容转化为字符串 1.Arrays.toString(a) 二.equals()比较两个数组的内容是否相等 2.Arrays.equals(a,b) 三.fill()将数组进行填充 //将数组的1到3(不包括3)的元素填充为5 3.Arrays.fill(a,1,3, ...
分类:编程语言   时间:2018-10-01 23:50:20    阅读次数:340
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!