Coding Interview Questions
- 0of 0 votes
AnswersImplement Run Length Encoding.
- gauravk.18 April 04, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersGiven a binary tree link all the right child of a node to their left siblings if present.
- gauravk.18 April 04, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersConsider the following IDL interface:
- The Hercules April 04, 2008
interface Time_Server
{
// Return the time on the server
string get_timestamp();
};
Write a client that for each command line argument(1) queries the naming service to resolve an object with the name provided on the command-line, (2)uses the object obtained via the naming service to query the time and (3) repeats the process after 60 seconds. Your code should not leak resources, continue to work despite exceptions, print all successful results to standard output & report all errors to standard error.
[There is some supporting code from Automated Trader's desk under the same directory]| Report Duplicate | Flag | PURGE
Automated Traders Desk Software Engineer / Developer C Coding - 0of 0 votes
AnswersImplement Strtok function.
- gauravk.18 April 04, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersOnsite Interview (coding test) --
- The Hercules April 04, 2008
Q3) Now write a derived class Undo_Buffer that derives from Buffer. It will provide the ability to undo the last change to the buffer. It should have a member variable, last_buffer, which is a copy of the internal unsigned char array from the last change to the buffer. For example, if the buffer has "0123456" and undo_buffer[3] = 'z' is called, then the Undo_Buffer class holds the new change value of "012z456".
Undo_Buffer should provide a method undo() which will revert the buffer to the last saved buffer. There does not need to be any access to the last_buffer, except to provide the functionality of undo.| Report Duplicate | Flag | PURGE
Automated Traders Desk Software Engineer / Developer C Coding - 0of 0 votes
AnswersOnsite Interview --
- The Hercules April 04, 2008
Directions
1) Write compiling (& working) code on linux
2) 2 hours.
3) Total questions 6 Mandatory 4(but 3 oky)
Q2) Write a simple buffer class that provides a fixed length of unsigned char. While you should not use the STL to implement the class the class should be written in such a way that it can be used in an STL collection (i.e std::list<Buffer> should work). Instances of Buffer should be allowed to be instantiated with an initial buffer size. Provide a reqize(size_t) method that will shrink or grow the buffer. Provide access to individual elements of the buffer (i.e the ability to get/set the nth element of the buffer)| Report Duplicate | Flag | PURGE
Automated Traders Desk Software Engineer / Developer C Coding - 2of 0 votes
AnswersOnsite Interview --
- The Hercules April 04, 2008
Directions
1) Write compiling (& working) code on linux
2) 2 hours.
3) Total questions 6. Mandatory 4 (but 3 acceptable)
Q1) Write a recursive funciton "sum" that computes the sum of all integers between 0 & n. For example, presented the number 10, it would return -15. Next, write a "main" that will drive the function by calling it for each "valid" argument in the program's argument list. If an argument is not an integer then print out an error message, wiht the double quotation marks.For example calling the program with
a.out 23 -12 foo 7
should result in output like
Sum of all integers between 0 & 23 is 276
Sum of all integers between 0 & -12 is -78
"foo" is not a number
Sum of all integers between 0 & 7 is 28| Report Duplicate | Flag | PURGE
Automated Traders Desk Software Engineer / Developer C Coding - 0of 0 votes
AnswersWrite code for extracting unique elements from a sorted list of array
- zdmytriv March 10, 2008| Report Duplicate | Flag | PURGE
Expedia Software Engineer / Developer Coding - 0of 0 votes
AnswersGiven a string with multiple occurrences of characters (e.g. abaabcddeadegfhhh) return a string that contains characters that appear an odd number of times. (In this case it would be (dgfh)).
- David Andrews March 08, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite a program to add two numbers a and b.
- gauravk.18 February 25, 2008
1. Without Using + operator
2. Without using any loops| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Coding - 1of 0 votes
AnswersWrite code to verify if an IP address taken as an input string is valid or not.
- gauravk.18 February 25, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersCount the number of bits that are 1 in a byte. (Char passed to function)
- Ronin February 19, 2008| Report Duplicate | Flag | PURGE
CapitalIQ Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite code to print the Fibonacci series.
- Rag February 14, 2008| Report Duplicate | Flag | PURGE
Amazon Development Support Engineer Coding - 0of 0 votes
Answers1. Given a huge file containing integers, how would display the 10 largest numbers in the file. There is a memory constraint and hence we cannot pull the whole file into any extra storage/Data structure.
- JJ February 05, 2008
2. Display all the numbers in the ascneding order without pulling the whole file into any extra storage/data structure.(managing memory efficiently)| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 1of 0 votes
AnswersGet all Rational Numbers such that:
- ganges January 31, 2008
1. Both numerator and denominator are strictly 2 digit numbers.
2. The last digit of the numerator = first digit of denominator
3. If you remove the last digit of numerator and first digit of denominator you will end up with the same numeric value
For e.g: 16/64| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersWhat is the size of int?
- cafemocha January 30, 2008| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer / Developer Coding - 0of 0 votes
Answerwrite a program in c language on matrix multiplication of complex numbers
- swathi January 06, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
Answersprint "google" in binary representation.
- wekingpro December 22, 2007| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Coding - 0of 0 votes
AnswersXSLT -
- Rakesh December 15, 2007
<a>
<b val="1"/>
<b val="2"/>
<b val="3"/>
</a>
Print the attrib vals| Report Duplicate | Flag | PURGE
Microsoft Coding Algorithm - 0of 0 votes
AnswersGiven two arrays char *pa, *pb. Write a function to return true/false. True if all occurrences of all chars in pb exist in pa. False if not.
- Rakesh December 15, 2007
Eg. if pa = czcz ; pb = czzz ; return false coz pb has one z extra
if pa = abaa; pb = ab ; return true
if pa = ab ; pb = ab ; return true| Report Duplicate | Flag | PURGE
Microsoft Data Structures Coding Algorithm - 0of 0 votes
AnswersDescribe the types of casting in C++.
- Jack December 15, 2007| Report Duplicate | Flag | PURGE
Video Gaming Technologies Software Engineer / Developer Coding - 1of 0 votes
AnswersI had an interview with Qualcomm about 2 weeks ago (for two days) with two different teams for two different software engineering positions.
- Amit December 10, 2007
The interview was very exhausting with questions ranging from sorting and searching algorithms and their efficiency discussions to coding questions in C, puzzles, device driver, boot loader, Networking questions and embedded and RTOS questions to projects I had worked upon during my Masters etc etc.
Both teams called me after about two days after the interview and told me that they are interested in making me an offer and I would have to tell them the team I am interested in working with. However the offer details came to me about two weeks after the interviews. The whole process was very professional and I am happy with the way they conducted it.| Report Duplicate | Flag | PURGE
Qualcomm Software Engineer / Developer Coding - 1of 1 vote
AnswersDesign an algorithm to find whether a given string is formed by the interleaving of two given strings or not.
- Aditya December 07, 2007
s1= aabccabc
s2= dbbabc
s3= aabdbbccababcc
Given s1,s2,s3 design an efficient algorithm to find whether s3 is formed from the interleaving of s1 and s2.| Report Duplicate | Flag | PURGE
Deshaw Inc Financial Software Developer Data Structures Coding Algorithm - 0of 0 votes
AnswersFind the Least Common Ancestor(LCA) of two nodes in a binary
- Aditya December 07, 2007
tree. Design an algo and explain the time and space complexities of the algorithm.
To understand LCA, please google it| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures Coding Algorithm - 0of 0 votes
AnswersAmazon in IIIT-H on 7th Dec
- Aditya December 07, 2007
1. Given two lists which are unosrted design an algo to find the intersection of the two lists.
Ex
1. 24 45 56 12 34
2. 12 31 14 24 56 67 89
Soln: 24 12 56
The lists are not linked lists. Just a stream of integers.
They are not sorted.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures Coding Algorithm - 0of 0 votes
AnswerWrite a smart_ptr class
- one2free December 06, 2007| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer / Developer Coding - 0of 0 votes
AnswersYou've been running test that seems to cause your computer to slow down each time you run it. For example, after running the test once, everything seems fine. But after several times, every action you do on your computer is noticeably slower. What are possible causes for the problem? For each possibility, how would you figure out if it really is the problem?
- wekingpro December 05, 2007| Report Duplicate | Flag | PURGE
Amazon Testing / Quality Assurance Coding