Coding Interview Questions
- 0of 0 votes
AnswersCreate a program that traverses a tree full of nodes and calls a function when it reaches a leaf node.
- dal December 04, 2007
<node> childnode
a node
+ childnodes
b node
+ childnodes
c node
+ childnodes
x node
d node
g node
p node| Report Duplicate | Flag | PURGE
Microsoft Web Developer Trees and Graphs Coding - 0of 0 votes
Answershow would you convert a given numerical input to roman numeral format???
- chrysalis November 20, 2007| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
Answershow would you convert a given numerical input between 1 and 3999 to roman numeral format???
- chrysalis November 20, 2007| Report Duplicate | Flag | PURGE
Amazon Development Support Engineer Coding - 0of 0 votes
Answersgiven a integer, output its previous and next neighbor number which has the same number of bit 1 in their binary representation.
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation Data Structures Coding Algorithm - 1of 1 vote
Answershow to divide an integer array into 2 sub-arrays and make their averages equal? e.g. a[left_portion]/left_portion_num == a[right_portion]/right_portion_num.
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation Data Structures Coding Algorithm - 0of 0 votes
AnswersAn array A[1...n] contains all the integers from 0 to n except one. In this problem, we cannot access an entire integer in A with a single operation. The elements of A are represented in binary, and the only operation we can use to access them is "fetch the jth bit of A[i]", which takes constant time. Find the missing integer in O(n) time.
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation Data Structures Coding Algorithm - 0of 0 votes
AnswersGiven 2D Matrix of characters; find whether a word is there in this array. It can start at any position and can be present horizontally, vertically and diogonally both in forward and reverse order.
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding Algorithm - 0of 0 votes
AnswersGiven 1 GB memory, input a file which contians 4 billion integers, output one integer that is not in the file. What if you have only 10 MB memory?
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding Algorithm Math & Computation Data Structures - 1of 0 votes
AnswersInput an integer array of size n and an integer k (k<=n), output all subsets of size k.
- AK47 November 08, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation Data Structures Coding Algorithm - 0of 0 votes
AnswersA) Write a function that will return the 5th from the last element of a singly linked list (eg. the 11th element of a list with 15 elements). Assume that the linked list class only implements two public members: Node GetFirstNode() and Node GetNextNode(Node node) methods. The latter method returns null when the end of list is reached.
- john October 23, 2007
B) Explain how you would test your solution.| Report Duplicate | Flag | PURGE
Symantec Software Engineer / Developer Coding - 0of 0 votes
Answerswrite a code to print last 10 lines in a file using c
- Venkatesh October 15, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite a code to generate a gray code . Approach is also fine.
- Venkatesh October 15, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersThis was my first question of the telephonic interview,
- CyberPhoenix October 02, 2007
Suppose there are two functions, Function First allocates a memory and then call Function Second..... But in Function Second Exception occurs!!! How do you notify Function First about this in order to deallocate the memory allocated by First???| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersImplement itoa - takes an integer as input and outputs its string equivalent.
- ismailbhai September 11, 2007
char* itoa(int n)| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding Algorithm - 0of 0 votes
AnswersGiven an array of sorted strings that also contains empty string at some locations, find a string in this array.
- vodangkhoa September 09, 2007
["a" "" "" "" "" "b" "c" "" "" "" "d" ""]| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding Algorithm - 0of 0 votes
AnswersGiven a preorder and inorder traversal of a binary tree, can you reproduce the tree? if yes, then write a function using C/C++ that builds the tree and returns the root node of the tree.
- sarthak September 04, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersHow can you unload a .class from JVM ?
- oxygen September 01, 2007| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer / Developer Coding - -1of 1 vote
AnswersFor the Location: CT, USA
- webenhanz August 09, 2007
1. describe OOP
2. describe Hibernate mapping that you have been work on
3. describe AJAX
4. What’s the difference between inner join and outer join?
5. Do you have any database design experience?
6. Do you have experience on JBoss
7. Do you have experience on Swing
8. Do you have experience on JMS
9. Do you have experience on SOAP| Report Duplicate | Flag | PURGE
SunGard Financial Software Developer Coding - 0of 0 votes
AnswersRotate a string (cyclic rotation) by the given integer
- jane June 25, 2007| Report Duplicate | Flag | PURGE
Microsoft Coding - 0of 0 votes
AnswersTruncate extra spaces between words in a string
- jane June 25, 2007| Report Duplicate | Flag | PURGE
Microsoft Coding - 0of 0 votes
AnswersDesign an algorithm and write code to see if a tree is balanced or not.
- logan June 14, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding Algorithm - 0of 0 votes
AnswersPrint all combinations of M members of a set of N elements in a sequence such that each set can be obtained from the previous set by deleting one member and adding one member.
- vodangkhoa June 11, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding Algorithm - 0of 0 votes
AnswersGiven a binary code for a number, write a program to find its gray code
- Sunaina May 29, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersGiven gray code of a binary number. Write a code to Find the binary number.
- Sunaina May 29, 2007| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersConvert Hello World! --> olleH dlroW!
- Pal May 25, 2007
was asked to write test cases and handle special chars.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 1of 0 votes
AnswersWrite a function that returns the longest palindrome in a given string. e.g "ccddcc" in the string "abaccddccefe"
- Laura May 07, 2007| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite a function that returns the longest run of a letter in a string. e.g. "cccc" in the string "abccccdef".
- Laura May 07, 2007| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding