leetcode
胖豆
我是一个胖胖的菜鸟豆,希望能在提高一点自己的coding能力
展开
-
236. Lowest Common Ancestor of a Binary Tree
leetcode题目描述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原创 2016-06-17 09:19:52 · 330 阅读 · 0 评论 -
235. Lowest Common Ancestor of a Binary Search Tree
leetcode题目描述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: “The lowest common ancestor is defined原创 2016-06-16 10:44:47 · 224 阅读 · 0 评论 -
257.BinaryTreePaths
257.BinaryTreePathsLeetCode题目描述Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree:1 / \ 2 3 \ 5 All root-to-leaf paths are:[“1->2->5”, “1->3”原创 2016-06-14 16:08:44 · 273 阅读 · 0 评论 -
H-Index
leetcode 274题目描述Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher’s h-index.According to the definition of h-index on Wik原创 2016-07-07 14:57:51 · 324 阅读 · 0 评论