上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 98 下一页
摘要: 949. Largest Time for Given Digits (string::compare) Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hou 阅读全文
posted @ 2018-12-02 12:55 Veritas_des_Liberty 阅读(229) 评论(0) 推荐(0) 编辑
摘要: int rangeMinQuery(int segTree[], int qlow, int qhigh, int low, int high, int pos) { if (qlow = high) return segTree[pos]; if (qlow > high || qhigh < low) return maxVal; i... 阅读全文
posted @ 2018-12-01 22:20 Veritas_des_Liberty 阅读(217) 评论(0) 推荐(0) 编辑
摘要: On an infinite number line (x-axis), we drop given squares in the order they are given. The i-th square dropped (positions[i] = (left, side_length)) i 阅读全文
posted @ 2018-12-01 18:15 Veritas_des_Liberty 阅读(444) 评论(0) 推荐(0) 编辑
摘要: Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g 阅读全文
posted @ 2018-12-01 17:17 Veritas_des_Liberty 阅读(172) 评论(0) 推荐(0) 编辑
摘要: A Range Module is a module that tracks ranges of numbers. Your task is to design and implement the following interfaces in an efficient manner. addRan 阅读全文
posted @ 2018-12-01 12:38 Veritas_des_Liberty 阅读(362) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Input: 1 \ 3 / 2 O 阅读全文
posted @ 2018-12-01 11:04 Veritas_des_Liberty 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(295) 评论(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 阅读(436) 评论(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 阅读(281) 评论(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 阅读(354) 评论(0) 推荐(0) 编辑
上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 98 下一页