摘要:
Find the K smallest numbers in an unsorted integer array A. The returned numbers should be in ascending order. Assumptions A is not null K is >= 0 and 阅读全文
摘要:
Given a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of any one of them. Two 阅读全文
摘要:
We are given a binary tree (with root node root), a target node, and an integer value K. Return a list of the values of all nodes that have a distance 阅读全文
摘要:
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 阅读全文
摘要:
Determine whether two given binary trees are identical assuming any number of ‘tweak’s are allowed. A tweak is defined as a swap of the children of on 阅读全文
摘要:
Write a SQL query to get the second highest salary from the Employee table. For example, given the above Employee table, the query should return 200 a 阅读全文
摘要:
Table: Person Table: Address Write a SQL query for a report that provides the following information for each person in the Person table, regardless if 阅读全文
摘要:
There is a table World A country is big if it has an area of bigger than 3 million square km or a population of more than 25 million. Write a SQL solu 阅读全文
摘要:
Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Exa 阅读全文
摘要:
Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list. Example:Assume that words = ["p 阅读全文