Given two sorted input arrays which contain a two element array of [key, value], write a function which multiplies the two arrays together and sums them where the "key" matches. Example: "v1 = [[1, 3], [2, 4], [99, 3]]; v2 = [[2,3],[5,9],[99,1]]" results in "15". I first brute forced it with O(n*m) then used two pointers which resulted in O(n+m) then he asked me to write it in O(n log m). I could not think of an algorithm at the time for O(n log m).
Developer Interview Questions
639,641 developer interview questions shared by candidates
How would you multiply two strings: "123 * "45", without any casting.
Microstrategy implement transformation object in which side ? analytic engine or sql side or other
Swap two digits from an integer, the result should be the maximum. For example 3580 -> 8350
How do you reverse the words in a string? Code.
Given a list of integers, some of which may be negative, extract the pair that sums to the largest number.
Given the following struct how much memory is require to store it in a 32-bit and 64-bit system? struct A { char t; char *t; }
A led bring 3times a minutes and another one 5 times for a span of 2 times. If both starts at a same time. How many times will they blink together at the end of the hour!?
Design patterns that would be used in a card game. Not objects and classes but design patterns.
Your on a farm, and your in a field with horses and you have a fence that you have to repair. But you left your hammer back at the house, what do you do? Remember the fence is broken and you cannot leave it alone otherwise the horses will escape.
Viewing 251 - 260 interview questions