Given an array of integers nums and an integer k. A continuous subarray is called nice if there are k odd numbers on it. Return the number of nice ...
There arensoldiers standing in a line. Each soldier is assigned auniqueratingvalue. You have to form a team of soldiersamongst them under the following rules: Choose soldiers with index i,j,k withrati ...
2020-04-02 12:52 0 1709 推荐指数:
Given an array of integers nums and an integer k. A continuous subarray is called nice if there are k odd numbers on it. Return the number of nice ...
题目链接 The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11.11 ...
题目: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 ...
原题地址:https://oj.leetcode.com/problems/count-and-say/ 题意: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21 ...
参考:https://leetcode.com/discuss/79083/share-my-solution First of all, let's look at the naive solution. Preprocess to calculate the prefix ...
Given an array of integers, every element appears twice except for one. Find that single one. Note: ...
原题地址:http://oj.leetcode.com/problems/valid-number/ 题意:判断输入的字符串是否是合法的数。 解题思路:这题只能用确定有穷状态自动机(DFA)来写会比较优雅。本文参考了http://blog.csdn.net/kenden23/article ...
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting ...