摘要: 题目如下: You are given an array nums of non-negative integers. nums is considered special if there exists a number x such that there are exactly x number 阅读全文
posted @ 2021-05-21 17:22 seyjs 阅读(139) 评论(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 slo 阅读全文
posted @ 2021-05-21 17:16 seyjs 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 题目如下: The Leetcode file system keeps a log each time some user performs a change folder operation. The operations are described below: "../" : Move to 阅读全文
posted @ 2021-05-21 17:12 seyjs 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Given an array of positive integers arr, calculate the sum of all possible odd-length subarrays. A subarray is a contiguous subsequence of the a 阅读全文
posted @ 2021-05-21 16:22 seyjs 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Given a 2D array of characters grid of size m x n, you need to find if there exists any cycle consisting of the same value in grid. A cycle is a 阅读全文
posted @ 2021-05-21 16:09 seyjs 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 题目如下: You are given a list of preferences for n friends, where n is always even. For each person i, preferences[i] contains a list of friends sorted i 阅读全文
posted @ 2021-05-21 14:43 seyjs 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Given a rows x cols matrix mat, where mat[i][j] is either 0 or 1, return the number of special positions in mat. A position (i,j) is called spec 阅读全文
posted @ 2021-05-21 14:28 seyjs 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 题目如下: You have an array arr of length n where arr[i] = (2 * i) + 1 for all valid values of i (i.e. 0 <= i < n). In one operation, you can select two i 阅读全文
posted @ 2021-05-21 14:13 seyjs 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Given an integer array arr, return true if there are three consecutive odd numbers in the array. Otherwise, return false. Example 1: Input: arr 阅读全文
posted @ 2021-05-21 14:05 seyjs 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Given two positive integers n and k, the binary string Sn is formed as follows: S1 = "0" Si = Si-1 + "1" + reverse(invert(Si-1)) for i > 1 Where 阅读全文
posted @ 2021-05-21 14:04 seyjs 阅读(70) 评论(0) 推荐(0) 编辑