Given a list of numbers and a rand(0,1) function, which returns a random integer between 0 and 1. Provide an algorithm to randomly sort the given list, based on the output of the rand() function, which should be called once for every number on the list. Code the solution in any language of your choice.
Engineers Interview Questions
843,473 engineers interview questions shared by candidates
He asked the best way to store boolean values on memory. I said an array but he wanted more, so in the end I said BinaryVector class. He asked why a binary vector is a better option but I couldn't answer that. I told him that I don't know the internal implementation.
Problem solving: 1. Given a no. Find next highest no. containing same digits. 2. Given a array and a value k. Find all unique pairs that sums up to k. 3. Anagram check. 4. Given a array, i, j. Find all nos. such that j > i and array[j] > array[i]. 5. Boolean matrix problem. make all the values in a row or column as '1' if there is at least one '1' in that row or column. 6. Given a array where consecutive digits differences out to particular set of values and no. 'k'. Find the index of 'k'. Use hashing. Scripting: 1. Given a log file containing req ID and time consumed. Find all req. IDs consuming time more than certain seconds. Red ID: xyz Time: 10 2. Given a file containing 'Stundent,Marks'. Sum the marks of students and display totals marks student wise. I/P: Stud1,20 Stud2,30 Stud1,10 Stud2,30 O/P: Stud1,30 Stud2,60
How would you implemented a priority queue that allows one to get minimum and maximum from the same data structure?
OOPS, String, Multi-threading, collections DBMS - Joins, Keys, Views, Stored procedures
Code to find a repeated number in an array
When does a deadlock occur?
Design a data structure/algorithm to keep track of instruments, stock exchanges, and trades which supports an addInstrument, addTrade and getAllTradesBetweenTimes(time1, time2) operation.
Do you like a manager who 'micromanages' or do you like a manager who leaves you a bit loose and does not follow what you are doing on an hourly basis ?
What is the difference between a FlipFlop and a latch?
Viewing 2211 - 2220 interview questions