shuaijiang's blog
  • 首页
  • 归档
  • 分类
  • 标签
  • 关于

LeetCode Ugly Number2

DescriptionWrite a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of the
8月 30 2015
#leetcode

LeetCode Edit Distance

DescriptionGiven two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 operations permitted on
8月 26 2015
#leetcode

LeetCode Simplify Path

DescriptionGiven an absolute path for a file (Unix-style), simplify it. For example,path = “/home/“, => “/home”path = “/a/./b/../../c/“, => “/c” The original problem is here. The original code i
8月 26 2015
#leetcode

LeetCode Missing Number

DescriptionGiven an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array. For example,Given nums = [0, 1, 3] return 2. Note:Your algorithm should r
8月 26 2015
#leetcode

LeetCode Binary Tree Paths

DescriptionGiven a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 All root-to-leaf paths are: ["1->2->5", "1
8月 26 2015
#leetcode

LeetCode Ugly Number

DescriptionWrite a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugl
8月 24 2015
#leetcode

LeetCode Substring with Concatenation of All Words

DescriptionYou are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly
8月 18 2015
#leetcode

LeeCcode: LRU Cache

DescriptionDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the value (will always be positive) of the
8月 13 2015
#leetcode

LeetCode Clone Graph

DescriptionClone an undirected graph. Each node in the graph contains a label and a list of its neighbors. The original problem is here. The original code is here.
8月 13 2015
#leetcode

LeetCode Word Ladder

DescriptionGiven two words (beginWord and endWord), and a dictionary, find the length of shortest transformation sequence from beginWord to endWord, such that: Only one letter can be changed at a tim
8月 13 2015
#leetcode
1…56789…26

搜索

Hexo Fluid
总访问量 次 总访客数 人