事情大概是说,Max Howell 去 Google 面试,面试官说:虽然在 Google 有 90% 的工程师用你写的 Homebrew,但是你居然不能在白板上写出翻转二叉树的代码,所以滚蛋吧。/** * Definition for a binary tree node. * public cl...
分类:
编程语言 时间:
2015-07-13 22:17:01
阅读次数:
106
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".public class Solution { public String addBin...
分类:
其他好文 时间:
2015-07-13 22:15:12
阅读次数:
114
Lowest Common Ancestor of a Binary TreeGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to thedefin...
分类:
其他好文 时间:
2015-07-13 22:04:56
阅读次数:
126
Question:Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100)...
分类:
其他好文 时间:
2015-07-13 20:25:01
阅读次数:
93
http加limit_conn_zone $binary_remote_addr zone=perip:10m;limit_conn_zone $server_name zone=perserver:10m;server加limit_conn perip 30;limit_conn perserve...
分类:
其他好文 时间:
2015-07-13 20:06:40
阅读次数:
124
Given a binary tree containing digits from 0-9 only, each root-to-leaf path
could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find the tota...
分类:
其他好文 时间:
2015-07-13 18:48:42
阅读次数:
103
题目Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes v a...
分类:
其他好文 时间:
2015-07-13 18:43:52
阅读次数:
75
1 package iYou.neugle.tree; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 public class Binary_Tree { 7 private Tree tree ...
分类:
编程语言 时间:
2015-07-13 17:49:16
阅读次数:
148
Well, a follow-up for the problemLowest Common Ancestor of a Binary Search Tree. However, this time you cannot figure out which subtree the given node...
分类:
其他好文 时间:
2015-07-13 17:47:40
阅读次数:
87
https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/ 1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * ...
分类:
其他好文 时间:
2015-07-13 17:36:27
阅读次数:
79