reverse a linked list in linear time, with constrained memory, no second container allowed.
Engineer Software Interview Questions
511,875 engineer software interview questions shared by candidates
You're writing an application that receives a stream of individual items of data. The stream may be very long or very short, but you have no way of knowing how long it is (i.e. there's no trick to figuring out the size of the stream of data). How would you go about choosing m items such that any subset of m items was equally likely? (Not an even distribution of values, but just that any m items are equally likely to be chosen). So for example, m=1000, and the number of items in the stream, n, may be 1000, or 10000, or 100000000, or much much larger; there is no way to know how many.
trickier question, code a method given the following method signature that will print out any numbers that intersect both arrays of numbers //Example arrays // 4, 18, 25, 40, 411 // 20, 25, 40, 320, 1009, 1100 void intersect(int[] arr1, int len1, int[] arr2, int len2) {
How would you write a sort routine to ensure that identical elements in the input are maximally spread in the output?
Knapsack problem with a twist that you can take any number of sacks of a given weight.
Second interview: 1) A shuffled set contains unique numbers except one of the numbers appears twice. Find the number that appears twice. (Funny enough the interviewer had a custom random shuffler function to shuffle the set. But his shuffler function was not truly random as he would randomly pick indexes from 0--length of set and swap but this could pick the same indexes twice. Its technically buggy code, but I didn't dare mention something like that in an interview. Goes to show how "strong" the developers working in Tinder are. It also explains the numerous buggy user experience on the app) 2) Merge part in merge sort
Create a cache with fast look up that only stores the N most recently accessed items.
Given a matrix of 0s and 1s, write code to get all the different ways of getting from a given cell to another, such that you can't walk through any of the cells with 0s in them.
Give a string of words. Find anagram words and put them into the same list, then output the list of anagram words lists. input: [add, dad, care, race] output: [[add, dad], [care, race]]
The one that tripped me up asked me to write code to return all words in a dictionary that can be formed from a string of numbers (e.g. 34556), where the numbers map the same why they do on a phone (e.g. 1->A, B, or C).
Viewing 1061 - 1070 interview questions