12 2022 档案

摘要:Given a string s, return the number of homogenous substrings of s. Since the answer may be too large, return it modulo 109 + 7. A string is homogenous 阅读全文
posted @ 2022-12-26 09:25 CNoodle 阅读(82) 评论(0) 推荐(0)
摘要:You are given an integer array nums of length n, and an integer array queries of length m. Return an array answer of length m where answer[i] is the m 阅读全文
posted @ 2022-12-25 12:13 CNoodle 阅读(352) 评论(0) 推荐(0)
摘要:You have two types of tiles: a 2 x 1 domino shape and a tromino shape. You may rotate these shapes. Given an integer n, return the number of ways to t 阅读全文
posted @ 2022-12-25 04:43 CNoodle 阅读(409) 评论(0) 推荐(0)
摘要:You are given two strings word1 and word2. You want to construct a string merge in the following way: while either word1 or word2 are non-empty, choos 阅读全文
posted @ 2022-12-25 03:32 CNoodle 阅读(69) 评论(0) 推荐(0)
摘要:You are playing a solitaire game with three piles of stones of sizes a​​​​​​, b,​​​​​​ and c​​​​​​ respectively. Each turn you choose two different no 阅读全文
posted @ 2022-12-22 02:36 CNoodle 阅读(130) 评论(0) 推荐(0)
摘要:You are given an integer array nums where the ith bag contains nums[i] balls. You are also given an integer maxOperations. You can perform the followi 阅读全文
posted @ 2022-12-20 12:59 CNoodle 阅读(194) 评论(0) 推荐(0)
摘要:There is a bi-directional graph with n vertices, where each vertex is labeled from 0 to n - 1 (inclusive). The edges in the graph are represented as a 阅读全文
posted @ 2022-12-19 14:24 CNoodle 阅读(412) 评论(0) 推荐(0)
摘要:You are given an integer array nums and two integers limit and goal. The array nums has an interesting property that abs(nums[i]) <= limit. Return the 阅读全文
posted @ 2022-12-16 08:41 CNoodle 阅读(59) 评论(0) 推荐(0)
摘要:There is a binary tree rooted at 0 consisting of n nodes. The nodes are labeled from 0 to n - 1. You are given a 0-indexed integer array parents repre 阅读全文
posted @ 2022-12-10 10:59 CNoodle 阅读(139) 评论(0) 推荐(0)
摘要:Given an integer n, return true if it is possible to represent n as the sum of distinct powers of three. Otherwise, return false. An integer y is a po 阅读全文
posted @ 2022-12-09 07:05 CNoodle 阅读(137) 评论(0) 推荐(0)
摘要:You are given two arrays of integers nums1 and nums2, possibly of different lengths. The values in the arrays are between 1 and 6, inclusive. In one o 阅读全文
posted @ 2022-12-07 07:33 CNoodle 阅读(121) 评论(0) 推荐(0)
摘要:You are given a string word that consists of digits and lowercase English letters. You will replace every non-digit character with a space. For exampl 阅读全文
posted @ 2022-12-06 04:52 CNoodle 阅读(100) 评论(0) 推荐(0)
摘要:You are given a 0-indexed integer array nums of length n. nums contains a valid split at index i if the following are true: The sum of the first i + 1 阅读全文
posted @ 2022-12-06 03:16 CNoodle 阅读(61) 评论(0) 推荐(0)
摘要:You are given a 0-indexed integer array nums of length n. The average difference of the index i is the absolute difference between the average of the  阅读全文
posted @ 2022-12-05 14:27 CNoodle 阅读(112) 评论(0) 推荐(0)
摘要:You have n boxes. You are given a binary string boxes of length n, where boxes[i] is '0' if the ith box is empty, and '1' if it contains one ball. In 阅读全文
posted @ 2022-12-02 07:38 CNoodle 阅读(136) 评论(0) 推荐(0)