Given an array of ints = [6, 4, 0, 5, 0, 0, 0, 1, 0] move all non zero numbers to the left and zeros to the right. How can you now improve your answer to O(n)?
Software Interview Questions
747,257 software interview questions shared by candidates
Write an algorithm to determine whether a given number is of the form (2^n)+1, where n is an integer.
What is polymorphism?
An array of 99 elements contains integers from 1 to 100 with one missing element. Find the missing element.
Given the list of points of the skyline of a city in order (from East to West) Find the maximal rectangle contained in this skyline. I was asked to write the code. I managed to find the algorithm but was not sufficient.
Given an array of positive integers and a target integer, find if there is a consecutive subarray that sums to the target. E.g, given {5,6,4,12}, findsum(10)=true, findsum(11)=false.
Coderpad: given an array scores[][] = {“jerry”,”65”},{“bob”,”91”}, {“jerry”,”23”}, {“Eric”,”83”}} Find the student with highest average score
Given an array of integers where each element points to the index of the next element how would you detect if there is a cycle in this array?
My experience and availability to relocate
Given a number find it is one less than the power of two.
Viewing 31 - 40 interview questions