摘要:
You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend take tu 阅读全文
摘要:
Given a binary tree, find the largest subtree which is a Binary Search Tree (BST), where largest means subtree with largest number of nodes in it. Not 阅读全文
摘要:
Design a Snake game that is played on a device with screen size = width x height. Play the game online if you are not familiar with the game. The snak 阅读全文
摘要:
Design a Phone Directory which supports the following operations: get: Provide a number which is not assigned to anyone. check: Check if a number is a 阅读全文
摘要:
Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is equal to B's row number. Example: 阅读全文
摘要:
Given a string, find the length of the longest substring T that contains at most k distinct characters. For example, Given s = “eceba” and k = 2, T is 阅读全文
摘要:
Given a non-empty string s and an integer k, rearrange the string such that the same characters are at least distance k from each other. All input str 阅读全文
摘要:
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to find the number of connected 阅读全文
摘要:
Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list -- w 阅读全文
摘要:
Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list -- w 阅读全文