摘要: 题目如下: Given a binary string s (a string consisting only of '0' and '1's). Return the number of substrings with all characters 1's. Since the answer ma 阅读全文
posted @ 2020-09-12 11:29 seyjs 阅读(175) 评论(0) 推荐(0)
摘要: 题目如下: Given an array of integers nums. A pair (i,j) is called good if nums[i] == nums[j] and i < j. Return the number of good pairs. Example 1: Input: 阅读全文
posted @ 2020-09-12 11:14 seyjs 阅读(371) 评论(0) 推荐(0)
摘要: 题目如下: Given an array nums, you are allowed to choose one element of nums and change it by any value in one move. Return the minimum difference between 阅读全文
posted @ 2020-09-12 10:43 seyjs 阅读(526) 评论(0) 推荐(0)
摘要: 题目如下: Given the array nums consisting of n positive integers. You computed the sum of all non-empty continous subarrays from the array and then sort t 阅读全文
posted @ 2020-09-12 10:17 seyjs 阅读(191) 评论(0) 推荐(0)
摘要: 题目如下: Given a date string in the form Day Month Year, where: Day is in the set {"1st", "2nd", "3rd", "4th", ..., "30th", "31st"}. Month is in the set  阅读全文
posted @ 2020-09-12 10:12 seyjs 阅读(225) 评论(0) 推荐(0)