上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 64 下一页
摘要: You have d dice, and each die has f faces numbered 1, 2, ..., f. Return the number of possible ways (out of fd total ways) modulo 10^9 + 7 to roll the 阅读全文
posted @ 2021-04-05 13:48 CNoodle 阅读(216) 评论(0) 推荐(0)
摘要: In a forest, each rabbit has some color. Some subset of rabbits (possibly all of them) tell you how many other rabbits have the same color as them. Th 阅读全文
posted @ 2021-04-04 08:56 CNoodle 阅读(182) 评论(0) 推荐(0)
摘要: A matrix diagonal is a diagonal line of cells starting from some cell in either the topmost row or leftmost column and going in the bottom-right direc 阅读全文
posted @ 2021-04-04 06:55 CNoodle 阅读(391) 评论(0) 推荐(0)
摘要: Normally, the factorial of a positive integer n is the product of all positive integers less than or equal to n. For example, factorial(10) = 10 * 9 * 阅读全文
posted @ 2021-04-04 06:07 CNoodle 阅读(143) 评论(0) 推荐(0)
摘要: Given an array arr that is a permutation of [0, 1, ..., arr.length - 1], we split the array into some number of "chunks" (partitions), and individuall 阅读全文
posted @ 2021-04-04 05:28 CNoodle 阅读(89) 评论(0) 推荐(0)
摘要: Given the root of a binary tree, return the sum of every tree node's tilt. The tilt of a tree node is the absolute difference between the sum of all l 阅读全文
posted @ 2021-04-04 04:55 CNoodle 阅读(93) 评论(0) 推荐(0)
摘要: You are given three positive integers: n, index, and maxSum. You want to construct an array nums (0-indexed) that satisfies the following conditions: 阅读全文
posted @ 2021-04-01 05:22 CNoodle 阅读(403) 评论(0) 推荐(0)
摘要: Given an m x n matrix mat where every row is sorted in strictly increasing order, return the smallest common element in all rows. If there is no commo 阅读全文
posted @ 2021-03-28 13:30 CNoodle 阅读(752) 评论(0) 推荐(0)
摘要: You are given an integer length and an array updates where updates[i] = [startIdxi, endIdxi, inci]. You have an array arr of length length with all ze 阅读全文
posted @ 2021-03-28 12:16 CNoodle 阅读(281) 评论(0) 推荐(0)
摘要: You are given an integer array nums. The absolute sum of a subarray [numsl, numsl+1, ..., numsr-1, numsr] is abs(numsl + numsl+1 + ... + numsr-1 + num 阅读全文
posted @ 2021-03-25 14:27 CNoodle 阅读(241) 评论(0) 推荐(0)
摘要: You are given a 2D integer array orders, where each orders[i] = [price, amount, orderType] denotes that amount orders have been placed of type orderTy 阅读全文
posted @ 2021-03-22 15:23 CNoodle 阅读(123) 评论(0) 推荐(0)
摘要: Starting with a positive integer N, we reorder the digits in any order (including the original order) such that the leading digit is not zero. Return  阅读全文
posted @ 2021-03-22 06:17 CNoodle 阅读(62) 评论(0) 推荐(0)
摘要: There are n rooms labeled from 0 to n - 1 and all the rooms are locked except for room 0. Your goal is to visit all the rooms. However, you cannot ent 阅读全文
posted @ 2021-03-21 02:44 CNoodle 阅读(93) 评论(0) 推荐(0)
摘要: Design a parking system for a parking lot. The parking lot has three kinds of parking spaces: big, medium, and small, with a fixed number of slots for 阅读全文
posted @ 2021-03-20 05:23 CNoodle 阅读(361) 评论(0) 推荐(0)
摘要: You are given an integer num. You can swap two digits at most once to get the maximum valued number. Return the maximum valued number you can get. Exa 阅读全文
posted @ 2021-03-18 00:29 CNoodle 阅读(102) 评论(0) 推荐(0)
摘要: You are given the head of a linked list, and an integer k. Return the head of the linked list after swapping the values of the kth node from the begin 阅读全文
posted @ 2021-03-17 05:58 CNoodle 阅读(317) 评论(0) 推荐(0)
摘要: Given two strings s and t, return the number of distinct subsequences of s which equals t. A string's subsequence is a new string formed from the orig 阅读全文
posted @ 2021-03-17 02:35 CNoodle 阅读(442) 评论(0) 推荐(0)
摘要: Assume the following rules are for the tic-tac-toe game on an n x n board between two players: A move is guaranteed to be valid and is placed on an em 阅读全文
posted @ 2021-03-15 06:33 CNoodle 阅读(411) 评论(0) 推荐(0)
摘要: Given a binary string s and an integer k. Return True if every binary code of length k is a substring of s. Otherwise, return False. Example 1: Input: 阅读全文
posted @ 2021-03-14 03:08 CNoodle 阅读(201) 评论(0) 推荐(0)
摘要: Given two integer arrays, preorder and postorder where preorder is the preorder traversal of a binary tree of distinct values and postorder is the pos 阅读全文
posted @ 2021-03-14 01:40 CNoodle 阅读(232) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 64 下一页