摘要:
题目如下: 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 ro 阅读全文
摘要:
题目如下: Given a string text, we are allowed to swap two of the characters in the string. Find the length of the longest substring with repeated characte 阅读全文
摘要:
题目如下: Given a string date representing a Gregorian calendar date formatted as YYYY-MM-DD, return the day number of the year. Example 1: Example 2: Exa 阅读全文
摘要:
题目如下: You are given an array of strings words and a string chars. A string is good if it can be formed by characters from chars (each character can on 阅读全文
摘要:
题目如下: Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level X such that th 阅读全文
摘要:
题目如下: Given an N x N grid containing only values 0 and 1, where 0 represents water and 1 represents land, find a water cell such that its distance to 阅读全文
摘要:
题目如下: Given a string s, return the last substring of s in lexicographical order. Example 1: Example 2: Note: 解题思路:我的方法是找出s中的最大字符max_char,然后以max_char为分 阅读全文