随笔分类 -  Great Questions

1 2 3 4 5 ··· 7 下一页
摘要:We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i]. You're given the startTime,  阅读全文
posted @ 2021-06-21 08:58 北叶青藤 阅读(85) 评论(0) 推荐(0)
摘要:Alex and Lee play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a positive integer number of sto 阅读全文
posted @ 2021-04-09 23:59 北叶青藤 阅读(53) 评论(0) 推荐(0)
摘要:Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. 阅读全文
posted @ 2021-03-29 05:18 北叶青藤 阅读(39) 评论(0) 推荐(0)
摘要:Given a robot cleaner in a room modeled as a grid. Each cell in the grid can be empty or blocked. The robot cleaner with 4 given APIs can move forward 阅读全文
posted @ 2021-03-29 04:32 北叶青藤 阅读(69) 评论(0) 推荐(0)
摘要:Given an array of positive integers arr (not necessarily distinct), return the lexicographically largest permutation that is smaller than arr, that ca 阅读全文
posted @ 2020-12-27 01:47 北叶青藤 阅读(128) 评论(0) 推荐(0)
摘要:Given two strings S and T, return if they are equal when both are typed into empty text editors. # means a backspace character. Example 1: Input: S = 阅读全文
posted @ 2020-12-16 07:55 北叶青藤 阅读(121) 评论(0) 推荐(0)
摘要:In an N by N square grid, each cell is either empty (0) or blocked (1). A clear path from top-left to bottom-right has length k if and only if it is c 阅读全文
posted @ 2020-09-22 02:29 北叶青藤 阅读(215) 评论(0) 推荐(0)
摘要:Given an array A of non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous) subarrays, which have lengths L and  阅读全文
posted @ 2020-03-15 08:29 北叶青藤 阅读(242) 评论(0) 推荐(0)
摘要:Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2020-02-03 02:10 北叶青藤 阅读(164) 评论(0) 推荐(0)
摘要:You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose o 阅读全文
posted @ 2019-08-19 03:51 北叶青藤 阅读(268) 评论(0) 推荐(0)
摘要:Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given 阅读全文
posted @ 2019-08-02 11:48 北叶青藤 阅读(202) 评论(0) 推荐(0)
摘要:Design a Snake game that is played on a device with screen size = width x height. Play the game online if you are not familiar with the game. The snak 阅读全文
posted @ 2019-07-31 14:10 北叶青藤 阅读(206) 评论(0) 推荐(0)
摘要:You are given a string expression representing a Lisp-like expression to return the integer value of. The syntax for these expressions is given as fol 阅读全文
posted @ 2019-07-20 13:08 北叶青藤 阅读(356) 评论(0) 推荐(0)
摘要:Implement FreqStack, a class which simulates the operation of a stack-like data structure. FreqStack has two functions: push(int x), which pushes an i 阅读全文
posted @ 2019-07-19 15:12 北叶青藤 阅读(254) 评论(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-07-18 12:01 北叶青藤 阅读(284) 评论(0) 推荐(0)
摘要:Design and implement a data structure for Least Frequently Used (LFU) cache. It should support the following operations: getand put. get(key) - Get th 阅读全文
posted @ 2019-07-17 12:48 北叶青藤 阅读(232) 评论(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-07-05 09:13 北叶青藤 阅读(166) 评论(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-06-16 06:51 北叶青藤 阅读(107) 评论(0) 推荐(0)
摘要:In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach o 阅读全文
posted @ 2017-01-02 02:26 北叶青藤 阅读(349) 评论(0) 推荐(0)
摘要:From: http://www.geeksforgeeks.org/find-number-of-triangles-possible/ Given an unsorted array of positive integers. Find the number of triangles that 阅读全文
posted @ 2017-01-01 05:34 北叶青藤 阅读(495) 评论(0) 推荐(0)

1 2 3 4 5 ··· 7 下一页