Coding Interview Questions
- 2of 0 votes
AnswersGiven a string s1 and a string s2, write a snippet to say whether s2 is a rotation of s1 using only one call to strstr routine?
- vodangkhoa January 31, 2007
(eg given s1 = ABCD and s2 = CDAB, return true)
(given s1 = ABCD, and s2 = ACBD , return false)| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding Algorithm - 0of 0 votes
AnswersA phone screen. Write a atoi function for decimal. Expected me to "tell" the code right
- InterviewGuy January 30, 2007
from "declare a variable i of type int" to the actual logic. Once this was done generalize it do the atoi for any radix.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersCreate a copy of an existing binary tree.
- Somenath January 29, 2007| Report Duplicate | Flag | PURGE
Microsoft Coding - 0of 0 votes
AnswersSuppose you have an NxN matrix of positive and negative integers. Write some code that finds the sub-matrix with the maximum sum of its elements
- Anuj January 27, 2007| Report Duplicate | Flag | PURGE
Agilent Technologies Microsoft Software Engineer / Developer Coding Matrix - 0of 0 votes
AnswersWrite an algorithm in a familiar language or in pseudocode that takes three coordinates and determine if they create a triangle.
- NotM$ January 11, 2007| Report Duplicate | Flag | PURGE
Microsoft Coding Algorithm - -1of 0 votes
AnswersWrite code to determine if a given square matrix is a magic square (each row, column, and diagonal has the same sum).
- paleo January 04, 2007| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Coding - 0of 0 votes
AnswersYou are given a 2-dimensional integer array Arr[M][N]. A few of the elements in this array are zero. Write an algorithm such that if A[i][j] is zero, all the elements in row i and all the elements in column j should be set to 0. In other words, if any element is zero, its entire row and column should be zero.
- Chandan December 25, 2006| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding Algorithm - 0of 0 votes
Answerswrite code to implement itoa()
- Chandan December 25, 2006| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersReverse a doubly linked list.
- Chandan December 25, 2006| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersHow do you put the data from a table to a dropdownlist in ASP.NET?
- Jason Yip December 22, 2006| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite code to determine the last occurance of a particular character, given a sentence of words (Recall: do not jumpt to a solution, ensure it is optimal)
- Wildcat December 22, 2006| Report Duplicate | Flag | PURGE
Microsoft Coding - 0of 0 votes
AnswersWrite code to insert an element into a doubly linked list, given that you have a global tail
- Wildcat December 22, 2006| Report Duplicate | Flag | PURGE
Microsoft Coding - 0of 0 votes
AnswersWrite code to detect whether or not a given number is prime
- Wildcat December 22, 2006| Report Duplicate | Flag | PURGE
Microsoft Coding - 0of 0 votes
AnswersWrite code to find the sqrt of a number without using any library functions
- Sach (Sachin) December 22, 2006| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite code to delete a node in circular linked list
- AP December 21, 2006| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite code to find n-th to last node in a linked list
- AP December 21, 2006| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersDiscuss the code of pre-order traversal of a tree.
- Gayle L McDowell December 21, 2006| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite a program to multiply 2 really long numbers
- Amod December 21, 2006| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite code to reverse the order of words in a sentence
- Amod December 21, 2006| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Coding - 0of 0 votes
AnswerHow do you implement polymorphism in C?
- Jack November 14, 2006| Report Duplicate | Flag | PURGE
American Airlines Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite the code for quadratic equation.. The equation is given. I identify all the corner cases.
- vodangkhoa November 12, 2006| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite the macro for Exclusive Or logical operator.
- vodangkhoa November 12, 2006| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersFind first non-duplicate character in a string
- Maddy November 10, 2006
"abcda" -> first non-duplicate 'b'| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersIf you are given a number as a parameter, write a function that would put commas after every third digit from the right.
- Ano November 06, 2006| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding