上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 98 下一页
摘要: Given an array nums, we call (i, j) an important reverse pair if i < j and nums[i] > 2*nums[j]. You need to return the number of important reverse pai 阅读全文
posted @ 2018-11-30 22:34 Veritas_des_Liberty 阅读(303) 评论(0) 推荐(0)
摘要: Given a data stream input of non-negative integers a1, a2, ..., an, ..., summarize the numbers seen so far as a list of disjoint intervals. For exampl 阅读全文
posted @ 2018-11-29 22:34 Veritas_des_Liberty 阅读(443) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2018-11-29 21:13 Veritas_des_Liberty 阅读(291) 评论(0) 推荐(0)
摘要: Motivation: Given a 1D array of n elements. [2, 5, -1, 3, 6] range sum query: what's the sum from 2nd element to 4th element query(2, 4)? 5 + (-1) + 3 阅读全文
posted @ 2018-11-28 22:04 Veritas_des_Liberty 阅读(365) 评论(0) 推荐(0)
摘要: You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smal 阅读全文
posted @ 2018-11-28 21:18 Veritas_des_Liberty 阅读(242) 评论(0) 推荐(0)
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is d 阅读全文
posted @ 2018-11-27 15:26 Veritas_des_Liberty 阅读(182) 评论(0) 推荐(0)
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the dep 阅读全文
posted @ 2018-11-27 13:09 Veritas_des_Liberty 阅读(182) 评论(0) 推荐(0)
摘要: Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and 阅读全文
posted @ 2018-11-26 22:11 Veritas_des_Liberty 阅读(201) 评论(0) 推荐(0)
摘要: 945. Minimum Increment to Make Array Unique Given an array of integers A, a move consists of choosing any A[i], and incrementing it by 1. Return the l 阅读全文
posted @ 2018-11-25 12:44 Veritas_des_Liberty 阅读(366) 评论(0) 推荐(0)
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2018-11-24 22:30 Veritas_des_Liberty 阅读(195) 评论(0) 推荐(0)
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 98 下一页