摘要: 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 阅读全文
posted @ 2018-02-28 15:11 轻风舞动 阅读(548) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 12:58 轻风舞动 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 09:41 轻风舞动 阅读(486) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 09:24 轻风舞动 阅读(883) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 09:11 轻风舞动 阅读(868) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 08:51 轻风舞动 阅读(1030) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 08:40 轻风舞动 阅读(1243) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 08:35 轻风舞动 阅读(1963) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 07:25 轻风舞动 阅读(745) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 07:10 轻风舞动 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 05:16 轻风舞动 阅读(1103) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-02-28 02:38 轻风舞动 阅读(1947) 评论(2) 推荐(0) 编辑