摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2019-02-21 17:51 JamieLiu 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to le 阅读全文
posted @ 2019-02-20 22:31 JamieLiu 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). Y 阅读全文
posted @ 2019-02-20 21:12 JamieLiu 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the numbe 阅读全文
posted @ 2019-02-19 17:32 JamieLiu 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number of elements initialized in nums1 and num 阅读全文
posted @ 2019-02-13 22:24 JamieLiu 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers where n > 1, return an array outputsuch that output[i] is equal to the product of all the elements of nums except nu 阅读全文
posted @ 2019-02-12 20:48 JamieLiu 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, two is written as II in Roman numeral, just two one's 阅读全文
posted @ 2019-02-12 20:21 JamieLiu 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Given a paragraph and a list of banned words, return the most frequent word that is not in the list of banned words. It is guaranteed there is at leas 阅读全文
posted @ 2019-02-11 23:06 JamieLiu 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-white 阅读全文
posted @ 2019-02-11 21:19 JamieLiu 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'. The matching should cover the entire  阅读全文
posted @ 2019-02-10 23:24 JamieLiu 阅读(347) 评论(0) 推荐(0) 编辑