摘要:
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 Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calcula 阅读全文
摘要:
268. Missing NumberGiven an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.Example 1:Inpu 阅读全文