随笔分类 -  RP

1 2 3 4 5 ··· 7 下一页
摘要: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 a node from a Circular Linked List which is sorted in ascending order, write a function to insert a value insertVal into the list such that it r 阅读全文
posted @ 2021-03-15 11:17 北叶青藤 阅读(60) 评论(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 infinite chess board with coordinates from -infinity to +infinity, you have a knight at square [0, 0].A knight has 8 possible moves it can make, 阅读全文
posted @ 2020-12-14 13:57 北叶青藤 阅读(216) 评论(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)
摘要: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 @ 2020-03-15 09:45 北叶青藤 阅读(164) 评论(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)
摘要:Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n 阅读全文
posted @ 2020-01-31 09:51 北叶青藤 阅读(156) 评论(0) 推荐(0)
摘要:Your task is to design the basic function of Excel and implement the function of sum formula. Specifically, you need to implement the following functi 阅读全文
posted @ 2019-08-12 09:14 北叶青藤 阅读(337) 评论(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)
摘要: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 a search autocomplete system for a search engine. Users may input a sentence (at least one word and end with a special character '#'). For each 阅读全文
posted @ 2019-07-15 05:34 北叶青藤 阅读(520) 评论(0) 推荐(0)
摘要:Given N, consider a convex N-sided polygon with vertices labelled A[0], A[i], ..., A[N-1] in clockwise order. Suppose you triangulate the polygon into 阅读全文
posted @ 2019-07-09 09:33 北叶青藤 阅读(656) 评论(0) 推荐(0)
摘要:There is a ball in a maze with empty spaces and walls. The ball can go through empty spaces by rolling up, down, left or right, but it won't stop roll 阅读全文
posted @ 2019-07-07 13:38 北叶青藤 阅读(489) 评论(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 @ 2019-07-06 11:56 北叶青藤 阅读(321) 评论(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 char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.Tasks could 阅读全文
posted @ 2019-06-26 14:21 北叶青藤 阅读(370) 评论(0) 推荐(0)
摘要:In this problem, a tree is an undirected graph that is connected and has no cycles. The given input is a graph that started as a tree with N nodes (wi 阅读全文
posted @ 2019-06-22 10:46 北叶青藤 阅读(216) 评论(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)
摘要:A group of friends went on holiday and sometimes lent each other money. For example, Alice paid for Bill's lunch for $10. Then later Chris gave Alice 阅读全文
posted @ 2019-06-16 01:31 北叶青藤 阅读(340) 评论(0) 推荐(0)

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