摘要:
题意: Given an array nums, we call (i, j) an important reverse pair if i < j and nums[i] > 2*nums[j]. 这种不能破坏 i 和j “相对关系” 的情况去统计一些结果的题,都可以考虑merge sort. m 阅读全文
摘要:
Given an integer array nums, return the number of range sums that lie in [lower, upper] inclusive.Range sum S(i, j) is defined as the sum of the eleme 阅读全文