随笔分类 -  leetcode

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页
https://leetcode.com/problemset/all/
摘要:Given a string S of digits, such as S = "123456579", we can split it into a Fibonacci like sequence [123, 456, 579]. Formally, a Fibonacci like sequen 阅读全文
posted @ 2018-11-05 15:13 bernieloveslife 阅读(189) 评论(0) 推荐(0)
摘要:Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at least three numbers. Except for the f 阅读全文
posted @ 2018-11-05 15:13 bernieloveslife 阅读(173) 评论(0) 推荐(0)
摘要:In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as 阅读全文
posted @ 2018-11-05 15:13 bernieloveslife 阅读(128) 评论(0) 推荐(0)
摘要:Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This 阅读全文
posted @ 2018-11-03 12:00 bernieloveslife 阅读(100) 评论(0) 推荐(0)
摘要:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2018-11-03 12:00 bernieloveslife 阅读(114) 评论(0) 推荐(0)
摘要:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For the purpose of this problem, w 阅读全文
posted @ 2018-11-03 12:00 bernieloveslife 阅读(111) 评论(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 @ 2018-11-03 12:00 bernieloveslife 阅读(86) 评论(0) 推荐(0)
摘要:Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after dividi 阅读全文
posted @ 2018-11-03 12:00 bernieloveslife 阅读(116) 评论(0) 推荐(0)
摘要:Given an unsorted integer array, find the smallest missing positive integer. Example 1: Input: [1,2,0] Output: 3 Example 2: Input: [3,4, 1,1] Output: 阅读全文
posted @ 2018-11-02 10:04 bernieloveslife 阅读(107) 评论(0) 推荐(0)
摘要:Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文
posted @ 2018-11-02 10:04 bernieloveslife 阅读(105) 评论(0) 推荐(0)
摘要:Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: 1. Each row must contain the di 阅读全文
posted @ 2018-11-02 10:04 bernieloveslife 阅读(101) 评论(0) 推荐(0)
摘要:Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime com 阅读全文
posted @ 2018-11-02 10:04 bernieloveslife 阅读(107) 评论(0) 推荐(0)
摘要:Given n non negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2018-11-02 10:03 bernieloveslife 阅读(127) 评论(0) 推荐(0)
摘要:Note: This is a companion problem to the System Design problem: Design TinyURL. TinyURL is a URL shortening service where you enter a URL such as http 阅读全文
posted @ 2018-11-01 13:50 bernieloveslife 阅读(154) 评论(0) 推荐(0)
摘要:Given two non negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Example 1: In 阅读全文
posted @ 2018-11-01 13:50 bernieloveslife 阅读(105) 评论(0) 推荐(0)
摘要:Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: The root is the maximum number in the array. Th 阅读全文
posted @ 2018-11-01 13:49 bernieloveslife 阅读(75) 评论(0) 推荐(0)
摘要:Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', and in any positions ) so that the resulting paren 阅读全文
posted @ 2018-11-01 13:49 bernieloveslife 阅读(120) 评论(0) 推荐(0)
摘要:An image is represented by a 2 D array of integers, each integer representing the pixel value of the image (from 0 to 65535). Given a coordinate (sr, 阅读全文
posted @ 2018-11-01 13:49 bernieloveslife 阅读(135) 评论(0) 推荐(0)
摘要:There is a box protected by a password. The password is n digits, where each letter can be one of the first k digits 0, 1, ..., k 1. You can keep inpu 阅读全文
posted @ 2018-10-31 11:46 bernieloveslife 阅读(202) 评论(0) 推荐(0)
摘要:Given an n ary tree, return the preorder traversal of its nodes' values. For example, given a 3 ary tree: Return its preorder traversal as: [1,3,5,6,2 阅读全文
posted @ 2018-10-31 11:46 bernieloveslife 阅读(68) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页