Write a function addSubtract that will do the following: addSubtract(5)(8)(3) -> 5 + 8 - 3 -> 10 addSubtract(2)(1)(1)(5)(3)(2) -> 2 + 1 - 1 + 5 - 3 + 2 -> 6 etc.
Engineers Interview Questions
841,754 engineers interview questions shared by candidates
There were 2 questions: 1 design and 1 implementation. The design was something like the following: you have a billion google searches a day, design a data structure which lets you pull out the top 100 unique ones at the end of the day.
Find the maximal and minimal number in an array of integers
Define binary search tree. Develop a procedure to verify a binary search tree.
A task in which I was required to print all numbers between 1 and a million - with no repeating digits - Easy enough! Just can throw you off guard a bit
1. mutable, non mutable classes in Java 2. declaring constants in Java 3. x^y algorithm and its optimization. 4. second largest number from Binary Tree
What's 2^32 ?
Find the number of ways to get from one corner of a grid to the opposite corner, by going down or right only.
Check if a string is balanced
Grid Illumination: Given an NxN grid with an array of lamp coordinates. Each lamp provides illumination to every square on their x axis, every square on their y axis, and every square that lies in their diagonal (think of a Queen in chess). Given an array of query coordinates, determine whether that point is illuminated or not. The catch is when checking a query all lamps adjacent to, or on, that query get turned off. The ranges for the variables/arrays were about: 10^3 < N < 10^9, 10^3 < lamps < 10^9, 10^3 < queries < 10^9.
Viewing 671 - 680 interview questions