随笔分类 -  Leetcode

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 23 下一页
摘要:In a given array nums of positive integers, find three non-overlapping subarrays with maximum sum. Each subarray will be of size k, and we want to max 阅读全文
posted @ 2019-03-13 18:17 Veritas_des_Liberty 阅读(200) 评论(0) 推荐(0) 编辑
摘要:Given a string S, find the number of different non-empty palindromic subsequences in S, and return that number modulo 10^9 + 7. A subsequence of a str 阅读全文
posted @ 2019-03-13 17:06 Veritas_des_Liberty 阅读(265) 评论(0) 推荐(0) 编辑
摘要:On an NxN chessboard, a knight starts at the r-th row and c-th column and attempts to make exactly K moves. The rows and columns are 0 indexed, so the 阅读全文
posted @ 2019-03-13 13:25 Veritas_des_Liberty 阅读(297) 评论(0) 推荐(0) 编辑
摘要:Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1: Example 2: Note: Length of the given array will be 阅读全文
posted @ 2019-03-13 12:44 Veritas_des_Liberty 阅读(172) 评论(0) 推荐(0) 编辑
摘要:There is a strange printer with the following two special requirements: The printer can only print a sequence of the same character each time. At each 阅读全文
posted @ 2019-03-12 16:16 Veritas_des_Liberty 阅读(235) 评论(0) 推荐(0) 编辑
摘要:Initially on a notepad only one character 'A' is present. You can perform two operations on this notepad for each step: Given a number n. You have to 阅读全文
posted @ 2019-03-12 15:30 Veritas_des_Liberty 阅读(224) 评论(0) 推荐(0) 编辑
摘要:Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c 阅读全文
posted @ 2019-03-11 16:38 Veritas_des_Liberty 阅读(188) 评论(0) 推荐(0) 编辑
摘要:You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can follow an 阅读全文
posted @ 2019-03-11 16:02 Veritas_des_Liberty 阅读(176) 评论(0) 推荐(0) 编辑
摘要:A message containing letters from A-Z is being encoded to numbers using the following mapping way: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Beyond that, now th 阅读全文
posted @ 2019-03-10 22:27 Veritas_des_Liberty 阅读(290) 评论(0) 推荐(0) 编辑
摘要:In LeetCode Store, there are some kinds of items to sell. Each item has a price. However, there are some special offers, and a special offer consists 阅读全文
posted @ 2019-03-10 21:30 Veritas_des_Liberty 阅读(243) 评论(0) 推荐(0) 编辑
摘要:Given two integers n and k, find how many different arrays consist of numbers from 1 to n such that there are exactly k inverse pairs. We define an in 阅读全文
posted @ 2019-03-10 20:30 Veritas_des_Liberty 阅读(357) 评论(0) 推荐(0) 编辑
摘要:Given a positive integer n, find the number of non-negative integers less than or equal to n, whose binary representations do NOT contain consecutive 阅读全文
posted @ 2019-03-09 22:24 Veritas_des_Liberty 阅读(284) 评论(0) 推荐(0) 编辑
摘要:There is an m by n grid with a ball. Given the start coordinate (i,j) of the ball, you can move the ball to adjacent cell or cross the grid boundary i 阅读全文
posted @ 2019-03-08 21:51 Veritas_des_Liberty 阅读(283) 评论(0) 推荐(0) 编辑
摘要:Given a positive integer n, return the number of all possible attendance records with length n, which will be regarded as rewardable. The answer may b 阅读全文
posted @ 2019-03-08 20:51 Veritas_des_Liberty 阅读(248) 评论(0) 推荐(0) 编辑
摘要:You are given a string representing an attendance record for a student. The record only contains the following three characters: 'A' : Absent. 'L' : L 阅读全文
posted @ 2019-03-08 12:13 Veritas_des_Liberty 阅读(210) 评论(0) 推荐(0) 编辑
摘要:Given several boxes with different colors represented by different positive numbers. You may experience several rounds to remove boxes until there is 阅读全文
posted @ 2019-03-07 22:08 Veritas_des_Liberty 阅读(335) 评论(0) 推荐(0) 编辑
摘要:Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that 阅读全文
posted @ 2019-03-07 20:56 Veritas_des_Liberty 阅读(214) 评论(0) 推荐(0) 编辑
摘要:You have n super washing machines on a line. Initially, each washing machine has some dresses or is empty. For each move, you could choose any m (1 ≤ 阅读全文
posted @ 2019-03-07 18:28 Veritas_des_Liberty 阅读(199) 评论(0) 推荐(0) 编辑
摘要:Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input: "bbbab 阅读全文
posted @ 2019-03-07 11:56 Veritas_des_Liberty 阅读(161) 评论(0) 推荐(0) 编辑
摘要:Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and t 阅读全文
posted @ 2019-03-07 11:03 Veritas_des_Liberty 阅读(193) 评论(0) 推荐(0) 编辑

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