Category: Hash Map / Hash Set
Design and implement a TwoSum class. It should support the following operations: add and find. add – Add the number to an internal data structure. find – Find if …
Given an array A of integers and integer K, return the maximum S such that there exists i < j with A + A = S and S < …
This is the technical phone interview question from Google. Google has offices in London but the call was from Google Switzerland (+41). The interview lasts for 45 minutes. Given …
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input …