随笔分类 - RP
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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 =
阅读全文
摘要: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,
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号