12 2018 档案
摘要:This problem was recently asked by Google. Given a list of numbers and a number k, return whether any two numbers from the list add up to k. For examp
阅读全文
摘要:Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k num
阅读全文
摘要:This problem was asked by Google. Implement locking in a binary tree. A binary tree node can be locked or unlocked only if all of its descendants or a
阅读全文
摘要:Implement a trie with insert, search, and startsWith methods. Notice You may assume that all inputs are consist of lowercase letters a-z. Implement a
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号