Given Coordinates, return N closest points to origin.
Software Development Interview Questions
36,995 software development interview questions shared by candidates
One of the logic questions involved determining whether someone was able to run a gas station given a list of requirements and a description of that person.
Asked question: Using an already implemented method Rand5() that generates a random integer between the ranges 1-5 uniformly. Using this method, implement a a new method that returns a random integer in the range 1-7 uniformly, i.e. Rand7(). Basically this is Rejection Sampling Algorithm. See http://leetcode.com/2010/11/rejection-sampling.html
Given a mathematical expression, what data structure would you use to evaluate the expression? How would you design the above question to use Trees/Graphs.
Given an integer, find the next biggest integer whose digits are in increasing order. Example: Input: 118 Output: 123 Input: 127 Output: 234 Input: 987 Output: 1234 Desing question: Design a parking space to park a car.
The first question was to find the first word on a stream that do not repeat in the rest of the stream. I got some Interfaces that I needed to implement, there was a example input and output.
1. Giving an array of integers from 1 to n-1 in random order where n is the size of the array. Find duplicates in the array and identify its runtime.
Lot of questions on the datastructure might be easier to remember all those stuff right out of college but after 9 years of expereince its very difficult
Given 4 points, write a method to determine if the 4th point is in the triangle made by the first 3 points
Write a function that given 2 strings, determines if they are disjoint.
Viewing 881 - 890 interview questions