摘要: 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 轻风舞动 阅读(760) 评论(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 轻风舞动 阅读(403) 评论(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 轻风舞动 阅读(1108) 评论(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 轻风舞动 阅读(1951) 评论(2) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer 阅读全文
posted @ 2018-02-27 10:24 轻风舞动 阅读(702) 评论(0) 推荐(0) 编辑
摘要: There are a row of n houses, each house can be painted with one of the k colors. The cost of painting each house with a certain color is different. Yo 阅读全文
posted @ 2018-02-27 08:54 轻风舞动 阅读(643) 评论(0) 推荐(0) 编辑
摘要: There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a certai 阅读全文
posted @ 2018-02-27 08:23 轻风舞动 阅读(1352) 评论(0) 推荐(0) 编辑
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2018-02-27 05:52 轻风舞动 阅读(1467) 评论(0) 推荐(0) 编辑
摘要: All LeetCode Questions List(Part of Answers, still updating) 题目汇总及部分答案(持续更新中) Leetcode problems classified by company 题目按公司分类(Last updated: October 2, 阅读全文
posted @ 2018-02-27 04:37 轻风舞动 阅读(9662) 评论(0) 推荐(0) 编辑
摘要: There is a fence with n posts, each post can be painted with one of the k colors. You have to paint all the posts such that no more than two adjacent 阅读全文
posted @ 2018-02-27 04:15 轻风舞动 阅读(550) 评论(0) 推荐(0) 编辑