![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
文章平均质量分 85
import_allen
每天都被自己弱醒
展开
-
[LeetCode] 235. Lowest Common Ancestor of a Binary Search Tree
题目: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 def原创 2016-08-27 17:03:16 · 397 阅读 · 0 评论 -
[LeetCode] 236. Lowest Common Ancestor of a Binary Tree
题目: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原创 2016-08-27 17:50:03 · 414 阅读 · 0 评论 -
[LeetCode] 289. Game of Life
题目:Given a board with m by n cells, each cell has an initial state live (1) or dead (0). Each cell interacts with its eight neighbors (horizontal, vertical, diagonal) using the following four ru原创 2016-08-27 18:17:51 · 453 阅读 · 0 评论 -
[LeetCode] 268. Missing Number
题目:Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given nums = [0, 1, 3] return 2.Note:Your algorith原创 2016-08-27 18:35:10 · 371 阅读 · 0 评论 -
[LeetCode] 260. Single Number III
题目:Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it wi原创 2016-08-27 19:34:30 · 500 阅读 · 0 评论 -
[LeetCode] 113. Path Sum II
题目:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and sum = 22, 5原创 2016-08-27 20:46:49 · 428 阅读 · 0 评论