摘要: 方法:前缀和 + 哈希表 O(N) class Solution { public int subarraySum(int[] nums, int k) { int count = 0,pre = 0; HashMap <Integer,Integer> mp = new HashMap<> (); 阅读全文
posted @ 2020-05-15 21:05 oldby 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 方法: class Solution { public int countDigitOne(int n) { int digit = 1,res = 0; int high = n / 10,cur = n % 10,low = 0; while(high != 0 || cur != 阅读全文
posted @ 2020-05-15 20:24 oldby 阅读(156) 评论(0) 推荐(0) 编辑