Given a set of people, one of them is a celebrity. You have a 2D array which describes which people know each other, that is [N, M] is true if N knows M. The celebrity will not know anyone (except them self) and everyone will know the celebrity. Find an order N algorithm to find the celebrity.
Engineer Senior Interview Questions
107,548 engineer senior interview questions shared by candidates
Give an array that has only the values 1, 2 or 3, sort the array in place.
Given an array of numbers, replace each number with the product of all the numbers in the array except the number itself *without* using division.
Write a C function to return the number of set bits in an integer.
Explain the data structure you would use to implement pop() and push(Object, int) for a Priority Queue.
Code to find character count in a given string.
what's wrong with the following code : <template type T > T accumulate ( vector<T> in) { T total = in[0]; for (int i =0; i < in.length() ; i++) { total = total + in[i]; } return T }
Rand(7) from Rand(5)
Write a function that divides one number by another, without using the division operator, and make it better than O(n).
Describe a function to check if an integer is a power of 2.
Viewing 21 - 30 interview questions