Developer Interview Questions

268,925 developer interview questions shared by candidates

Within 2-3 hours write a program that reads words from a large file, counts how many times an individual word occurs and output them in the order of decreasing number of occurrences. The language doesn't matter, just negotiate the programming environment you prefer in advance.
avatar

Software Developer

Interviewed at RBC

3.9
Mar 20, 2012

Within 2-3 hours write a program that reads words from a large file, counts how many times an individual word occurs and output them in the order of decreasing number of occurrences. The language doesn't matter, just negotiate the programming environment you prefer in advance.

Given a sequence consisting of letters and numbers, re-arrange the sequence so that the numbers come together first, while maintaining their initial order in the sequence (not allowed to use additional memory) e.g. Input : 12gh45fd3, Output : 12453ghfd
avatar

Software Developer

Interviewed at D. E. Shaw & Co. - Investment Firm

3.8
Feb 23, 2011

Given a sequence consisting of letters and numbers, re-arrange the sequence so that the numbers come together first, while maintaining their initial order in the sequence (not allowed to use additional memory) e.g. Input : 12gh45fd3, Output : 12453ghfd

Implement a method 'find' that will find the starting index (zero based) where the second list occurs as a sub-list in the first list. It should return -1 if the sub-list cannot be found. Arguments are always given, not empty. Sample Input 1 list1 = (1, 2, 3) list2 = (2, 3) Sample Output 1 1 Explanation As second list (2, 3) is sub-list in first list (1, 2, 3) at index 1 Sample Input 2 list1 = (1, 2, 3) list2 = (3, 2) Sample Output 2 -1
avatar

Senior Java Developer

Interviewed at Atlassian

3.1
Apr 13, 2016

Implement a method 'find' that will find the starting index (zero based) where the second list occurs as a sub-list in the first list. It should return -1 if the sub-list cannot be found. Arguments are always given, not empty. Sample Input 1 list1 = (1, 2, 3) list2 = (2, 3) Sample Output 1 1 Explanation As second list (2, 3) is sub-list in first list (1, 2, 3) at index 1 Sample Input 2 list1 = (1, 2, 3) list2 = (3, 2) Sample Output 2 -1

Viewing 391 - 400 interview questions

Glassdoor has 268,925 interview questions and reports from Developer interviews. Prepare for your interview. Get hired. Love your job.