Coding Interview Questions
- 0of 0 votes
Answerswrite a method to return first non-repeated character in a string. example: String = "total" then method returns char = 'o'. then explain why you choose your algorithm.
- biggied88 May 18, 2010| Report Duplicate | Flag | PURGE
Denmin Group Software Engineer / Developer Coding - 0of 0 votes
Answerswrite a method that is used to test the input string arrays for equality.
- Anonymous May 15, 2010
The input arrays need not be ordered in any way and may contain duplicates.
The order of the elements in the arrays and duplicates are ignored.
For example the following two arrays will be considered equal:
{"a","b","ab"} is equal to {"a","b","ab","ab"}
The following arrays are not equal:
{"a","b"} is not equal to {"a","ab"}
this is your signature:
public static boolean allStringSetsIdentical(String[][]sets){| Report Duplicate | Flag | PURGE
Software Engineer / Developer Coding - 0of 0 votes
AnswersSay you have a binary tree which looks like this
A / \ B C / \ / \ D E F G / / H I
Assume A is level 1. So here you can see that the width at level 3 = 4, which is the max width of the tree.
So given a binary tree, find the max width of the tree.This is your function:
- Anonymous May 14, 2010public int findWidth(Node root) and public Node{ String val; Node getLeft(); Node getRight(); }
| Report Duplicate | Flag | PURGE
Software Engineer / Developer Coding - 0of 0 votes
AnswersThis Was the toughest and last question
- rohith May 11, 2010
0,1
2 - ABC
3- DEF
4- GHI
5-JKL
6-MNO
7- PQR
8- STU
9- VWXYZ
Each number represents the set of variables and When we input a number . it should be replaced by all possible string values corresponding. eg : if we enter 27190000.
It should output.
APV
APW
APX
APY
APZ
...........| Report Duplicate | Flag | PURGE
Epic Systems System Administrator Coding - -1of 1 vote
AnswersIn a company , there are three categories.A,B,C.
- rohith May 11, 2010
They want to give an increment.So if category C gets N% as increment. category B gets 2N% as increment and category A gets 3N% as increment.But the increment should be atleast 1% and The total updated salary should not exceed $50,000.
Print the increment and the total updated salary for a particular employee.
Assume all the required variables.| Report Duplicate | Flag | PURGE
Epic Systems System Administrator Coding - 0of 0 votes
AnswersAt a geeks goodies store.. every thing is either one dollar or less. and they accept only 10 dollars or less than 10 as denominations.So make a function that takes in the cost and payment as input and that out puts the change.
- rohith May 11, 2010
The denominations are namely 1c,5c,10c,25c,$1,$5,$10| Report Duplicate | Flag | PURGE
Epic Systems System Administrator Coding - 0of 0 votes
AnswersTake string as an input from the user.After taking. consider A ,a ,e,E,i,I,o,O,u,U, -- if these letters appear in the string.. then replace them with A^ ,a^,e^,E^,i^,I^,o^,O^,u^,U^. leave the first three eligible letters from the starting of the string.---
- rohith May 11, 2010
example --- greateribblizing.
converts to greateri^bbli^zi^ng.| Report Duplicate | Flag | PURGE
Epic Systems System Administrator Coding - 0of 0 votes
AnswersTake the user gives a set of numbers as input.Stop taking the input when he enters 0. Display the maximum odd integer and minimum even integer.See that the user inputs correct values as input.
- rohith May 11, 2010| Report Duplicate | Flag | PURGE
Epic Systems System Administrator Coding - 0of 0 votes
Answersbarring the first 3 vowels in a string , convert all vowels to a e i o u ( with a caveat , something like special vowels in french and other european languages) . at the same time not more than 4 vowels from the last shud be changed.
- Anonymous April 25, 2010| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer Coding - 0of 0 votes
AnswersYou are supposed to write a code for a cashier such that , given the money paid by the customer and the cost of the product , if would display the number of 10 dollar notes, 5 dollar notes, 1 dollar notes...quarters ,dimes .. in decreasing order ( something like applying greedy approach).
- Anonymous April 23, 2010| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer Coding - 0of 0 votes
AnswersWrite a program to which takes an array of digits and prints the histogram of the distribution of digits in horizontal manner. (Vertical histogram and cap on the max value for bonus points)
- interviewguy April 11, 2010| Report Duplicate | Flag | PURGE
Goldman Sachs Software Engineer in Test Coding - 0of 0 votes
Answersgiven an array of numbers where each number has a duplicate in the array except one number, write a program to return the lone number.
- S April 10, 2010
For eg: if the array is 1,8,5,8,1,3,5 then your program should return 3.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
Answersgiven a string, write a program to find if it is a palindrome or not.
- S April 10, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersGiven a string.Replace the words whose lengt>=4 and is even,with a space between the two equal halves of the word.consider only alphabets for finding the eveness of the word
- raady April 08, 2010
I/P "A person can't walk in this street"
O/P "A per son ca n't wa lk in th is stre et"| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer Coding - 0of 0 votes
AnswerAsked me to write a C program which would accept some input strings on command line and then print those strings which are aligned to 80 chars a line..
- dnivra April 08, 2010
This was the ONLY sensible question in the entire interview I would say.. Amazon sucks ,,|,,| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersYou have a string which stores a number with commas. For example, a string that has the number 345,000,000. How will you manipulate this string in-place [without using any extra memory] so that the output is the original string without any commas in O(n) ?
- Bandicoot April 02, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm Arrays C Coding String Manipulation - 0of 0 votes
AnswersGiven an array of numbers, find if sum of any two elements is equal to K (constant).
- AnonymousUser March 27, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
AnswersFind all files with US phone number format and print out
- hotdell March 26, 2010| Report Duplicate | Flag | PURGE
Amazon Front-end Software Engineer Coding - 0of 0 votes
AnswersPrint the longest sequence of numbers that appear in ascending order in an array(need not be contiguous). Suppose your array has values a={8,6,5,1,9,3,7,4,2,10}, the output would be 1,3,4,10.
- Anonymous March 22, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm Arrays Coding - 0of 0 votes
AnswersSuppose two lists merge at some node .. how do you find that particular node ..
- AA March 20, 2010 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Coding - 0of 0 votes
AnswersImplement strstr()
- amazon March 20, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
Answers#1. Implement (in C++ or C#) a function that removes the nth element of a single linked list.
- abhays.1984 March 19, 2010
C++:
class Node
{
char* value;
Node* next;
};
Node** RemoveNth (Node** list, int n)
{
}
C#:
class Node
{
string value;
Node next;
}
Node RemoveNth(Node list, int n)
{
}
#2. Using the following table provide at least 5 test cases to test the function implemented in the previous part.
Node n Expected Result
~~~~ ~~~ ~~~~~~~~~~~~~~~~~| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding Data Structures Testing - 0of 0 votes
AnswersWrite a function that would: return the 5th element from the end in a singly linked list of integers, in one pass, and then provide a set of test cases against that function
- abhays.1984 March 19, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding Testing Linked Lists - 0of 0 votes
AnswersFind the intersection of 2 lists
- kanurukh March 19, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding - 0of 0 votes
Answershow do u multiply a number by 7..tell an efficient method
- anon March 11, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Coding