摘要: 题目如下: You are given a string s of even length. Split this string into two halves of equal lengths, and let a be the first half and b be the second hal 阅读全文
posted @ 2022-02-07 16:02 seyjs 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 题目如下: You may recall that an array arr is a mountain array if and only if: arr.length >= 3 There exists some index i (0-indexed) with 0 < i < arr.leng 阅读全文
posted @ 2022-02-07 15:57 seyjs 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 题目如下: You are given a 0-indexed integer array nums and an integer k. You are initially standing at index 0. In one move, you can jump at most k steps 阅读全文
posted @ 2022-02-07 15:46 seyjs 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 题目如下: You are given an array of positive integers nums and want to erase a subarray containing unique elements. The score you get by erasing the subar 阅读全文
posted @ 2022-02-05 16:58 seyjs 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 题目如下: You are given a phone number as a string number. number consists of digits, spaces ' ', and/or dashes '-'. You would like to reformat the phone 阅读全文
posted @ 2022-02-05 16:53 seyjs 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 题目如下: There is a stream of n (idKey, value) pairs arriving in an arbitrary order, where idKey is an integer between 1 and n and value is a string. No 阅读全文
posted @ 2022-02-05 16:50 seyjs 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 题目如下: You are given an integer array nums sorted in non-decreasing order. Build and return an integer array result with the same length as nums such t 阅读全文
posted @ 2022-02-05 16:42 seyjs 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 题目如下: You are given a string allowed consisting of distinct characters and an array of strings words. A string is consistent if all characters in the 阅读全文
posted @ 2022-02-04 16:38 seyjs 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 题目如下: A decimal number is called deci-binary if each of its digits is either 0 or 1 without any leading zeros. For example, 101 and 1100 are deci-bina 阅读全文
posted @ 2022-02-04 16:35 seyjs 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 题目如下: You are given an integer n, the number of teams in a tournament that has strange rules: If the current number of teams is even, each team gets p 阅读全文
posted @ 2022-02-04 16:28 seyjs 阅读(43) 评论(0) 推荐(0) 编辑