摘要:
A message containing letters from A-Z is being encoded to numbers using the following mapping: Given a non-empty string containing only digits, determ 阅读全文
摘要:
You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. Given n, find the total number 阅读全文
摘要:
Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. E 阅读全文
摘要:
Design and implement a TwoSum class. It should support the following operations:add and find. add - Add the number to an internal data structure.find 阅读全文
摘要:
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function 阅读全文
摘要:
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
摘要:
The API: int read4(char *buf) reads 4 characters at a time from a file.The return value is the actual number of characters read. For example, it retur 阅读全文
摘要:
The API: int read4(char *buf) reads 4 characters at a time from a file. The return value is the actual number of characters read. For example, it retu 阅读全文
摘要:
How would you design a URL shortening service that is similar to TinyURL? Background:TinyURL is a URL shortening service where you enter a URL such as 阅读全文
摘要:
TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http 阅读全文
摘要:
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may cont 阅读全文
摘要:
Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Example 1 阅读全文