摘要: 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 阅读(239) 评论(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 阅读(455) 评论(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 阅读(176) 评论(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 阅读(369) 评论(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 阅读(299) 评论(0) 推荐(0)