随笔分类 -  algorithm

上一页 1 ··· 8 9 10 11 12 13 下一页
摘要:n LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascendi 阅读全文
posted @ 2017-11-09 06:58 逸朵 阅读(155) 评论(0) 推荐(0)
摘要:Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]. 阅读全文
posted @ 2017-11-09 06:44 逸朵 阅读(146) 评论(0) 推荐(0)
摘要:Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2017-11-09 06:15 逸朵 阅读(91) 评论(0) 推荐(0)
摘要:Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2017-11-09 05:28 逸朵 阅读(102) 评论(0) 推荐(0)
摘要:Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix: You s 阅读全文
posted @ 2017-11-09 05:04 逸朵 阅读(127) 评论(0) 推荐(0)
摘要:Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, 阅读全文
posted @ 2017-11-09 04:37 逸朵 阅读(142) 评论(0) 推荐(0)
摘要:le is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solution 阅读全文
posted @ 2017-11-09 04:23 逸朵 阅读(116) 评论(0) 推荐(0)
摘要:Implement pow(x, n). Example 1: Example 2: 阅读全文
posted @ 2017-11-09 02:40 逸朵 阅读(150) 评论(0) 推荐(0)
摘要:u are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note:You have to rotate the image in-place, which me 阅读全文
posted @ 2017-11-09 02:17 逸朵 阅读(167) 评论(0) 推荐(0)
摘要:Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following unique pe 阅读全文
posted @ 2017-11-09 01:29 逸朵 阅读(110) 评论(0) 推荐(0)
摘要:Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2, 阅读全文
posted @ 2017-11-09 01:14 逸朵 阅读(111) 评论(0) 推荐(0)
摘要:Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including 阅读全文
posted @ 2017-11-08 12:40 逸朵 阅读(120) 评论(0) 推荐(0)
摘要:Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2. Note: The length of both num1 and num2 is < 阅读全文
posted @ 2017-11-08 11:50 逸朵 阅读(108) 评论(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 @ 2017-11-08 10:26 逸朵 阅读(93) 评论(0) 推荐(0)
摘要:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each num 阅读全文
posted @ 2017-11-07 12:44 逸朵 阅读(126) 评论(0) 推荐(0)
摘要:Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums 阅读全文
posted @ 2017-11-07 12:25 逸朵 阅读(367) 评论(0) 推荐(0)
摘要:The count-and-say sequence is the sequence of integers with the first five terms as following: 1 is read off as "one 1" or 11.11 is read off as "two 1 阅读全文
posted @ 2017-11-07 11:36 逸朵 阅读(157) 评论(0) 推荐(0)
摘要:Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled wit 阅读全文
posted @ 2017-11-06 05:45 逸朵 阅读(135) 评论(0) 推荐(0)
摘要:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2017-11-06 04:48 逸朵 阅读(133) 评论(0) 推荐(0)
摘要:Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexi 阅读全文
posted @ 2017-11-06 02:55 逸朵 阅读(114) 评论(0) 推荐(0)

上一页 1 ··· 8 9 10 11 12 13 下一页