上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 37 下一页
摘要: This problem was asked by Twitter. You run an e-commerce website and want to record the last N order ids in a log. Implement a data structure to accom 阅读全文
posted @ 2018-12-14 01:45 Review->Improve 阅读(1820) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers A with even length, return true if and only if it is possible to reorder it such that A[2 * i + 1] = 2 * A[2 * i] for every 阅读全文
posted @ 2018-12-10 14:22 Review->Improve 阅读(581) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = "eceba", k = 2 Output: 3 阅读全文
posted @ 2018-12-10 12:11 Review->Improve 阅读(3053) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n 阅读全文
posted @ 2018-11-30 00:18 Review->Improve 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文
posted @ 2018-11-11 01:30 Review->Improve 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest le 阅读全文
posted @ 2018-11-10 01:59 Review->Improve 阅读(342) 评论(0) 推荐(0) 编辑
摘要: A quadtree is a tree data in which each internal node has exactly four children: topLeft, topRight, bottomLeft and bottomRight. Quad trees are often u 阅读全文
posted @ 2018-11-08 00:39 Review->Improve 阅读(632) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index as the index where the sum of 阅读全文
posted @ 2018-11-06 23:59 Review->Improve 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array of n distinct integers where each integer is in the range from 0 to m - 1 and m > n. Find the smallest number that is missing fro 阅读全文
posted @ 2017-12-05 12:52 Review->Improve 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target va 阅读全文
posted @ 2017-11-13 06:23 Review->Improve 阅读(175) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 37 下一页