摘要: 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 may be t 阅读全文
posted @ 2020-07-13 06:41 Schwifty 阅读(261) 评论(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: nums 阅读全文
posted @ 2020-07-13 05:36 Schwifty 阅读(294) 评论(0) 推荐(0)