摘要:
题目如下: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tre 阅读全文
摘要:
题目如下: Given a positive integer K, you need find the smallest positive integer N such that N is divisible by K, and N only contains the digit 1. Return 阅读全文
摘要:
题目如下: A character is unique in string S if it occurs exactly once in it. For example, in string S = "LETTER", the only unique characters are "L" and " 阅读全文
摘要:
题目如下: Given a binary string S (a string consisting only of '0' and '1's) and a positive integer N, return true if and only if for every integer X from 阅读全文
摘要:
题目如下: Given an array A of positive integers, A[i]represents the value of the i-th sightseeing spot, and two sightseeing spots i and j have distance j 阅读全文
摘要:
题目如下: Given an array A of integers, return true if and only if we can partition the array into three non-emptyparts with equal sums. Formally, we can 阅读全文
摘要:
题目如下: Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of 阅读全文
摘要:
题目如下: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may 阅读全文
摘要:
题目如下: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may 阅读全文
摘要:
题目如下: Your are given an array of integers prices, for which the i-th element is the price of a given stock on day i; and a non-negative integer feerep 阅读全文