Topic — Add New » Posts Last Poster Freshness
Amazon Interview Question for Software Engineer/Developer (Fresher) about Algorithms 3 PsychoCoder 7 hours

implement a func node *(char *word){}
wich returns a link list of words dat are anagrams with the input word..if no anagrams found return NULL and add that word to the link list

given structure of list as
struct node {
struct node *next;
char val[101];
};

Amazon
data structures : amazon 1 abzx12@gmail.com 10 hours

Given numbers 1 to 1000, suggest a data structure to store them such that following operations can be executed in constant time:
1- insertion,
2- deletion,
3- searching,
4- get_any_number (means return any number if present in the data-structure otherwise return -1).

NOTE: Numbers are unique in the data structure.

Amazon Interview Question for Software Engineer/Developer about Algorithms 5 PsychoCoder 11 hours

for a given file(80 column and 100 lines) find in how many lines a word occur. the answer is like:

"the" in line 5,8,23.
"name" in line 45,23...

for all the words.

Amazon
Amazon Interview Question for Software Engineer/Developer about Arrays 2 PsychoCoder 11 hours

Given two arrays, one is 1D array and other is 2D array. U need to find out whether 2D array contains the subset of 1D array. The elements of 1D array not neccessary present in the same row it can be either on the up or down but should be continuous in the 2D array.

Amazon
Amazon Interview Question for Software Engineer/Developer about Linked Lists 5 PsychoCoder 11 hours

Perform inplace(we cant create new node)merge of two sorted linked lists.

Amazon
Amazon Interview Question for Software Engineer/Developer about Data Structure 5 PsychoCoder 11 hours

What kind a data structure will you use to implement an Instant Search feature.

Amazon
How to find out the position of a msb in a number? 1 PsychoCoder 13 hours

Running time as faster as you can. Logarithmic time expected !!

Do not use in built log function or __builtin_clz

Amazon Interview Question for Software Engineer/Developer about Arrays 7 PsychoCoder 16 hours

Given an array-based heap on n elements and a real number x, efficiently determine whether the kth smallest element in the heap is greater than or equal to x. Your algorithm should be O(k) in the worst-case, independent of the size of the heap.

Amazon
Amazon Interview Question for Software Engineer/Developer (0 - 2 Years) about Algorithms 14 PsychoCoder 18 hours

write an algorithm finding the no.of one bits from 1 to n,for given any n value.
complexity should be good
example:
1=1
2=10
3=11
4=100
5=101
6=110
.
.
if n=3 then ur answer is 4
if n=6 then ur answer is 9

Interviewer is looking for an algo in O(log n)time complexity

Amazon
Amazon Interview Question for Software Engineer/Developer about Algorithms 4 PsychoCoder 19 hours

Get the depth of a tree without using recursion

Amazon
Amazon placement 2 kartik 1 day

You are given a linked list. Apart from the normal "Next" pointer, there is one more pointer(random ptr) in each node which points to some random node of the list. How will you create a clone of such a list? (In less than O(n^2))

Amazon Interview Question for Software Engineer/Developer (0 - 2 Years) 3 PsychoCoder 1 day

You are given a function printMostFrequentWords which takes in an array of strings. You are required to print a list of all the letters that occurred with the highest frequency in each line of the array, followed by the frequency.
The list of letters should be an alphabetical list of upper case letters followed by an alphabetical list of lower case letters.
Sample Test Cases:

Input #00:
When riding your bicycle backwards down a one-way street, if the
wheel fall...

Amazon
Amazon Interview Question for Software Engineer/Developer (Fresher) about Arrays 6 PsychoCoder 1 day

Given an array (length n), we need to find the subarray (length k) such that the sum of the first j elements of the subarray equals the sum of the remaining (k-j) elements of the subarray.
For e.g.
Array: 2,2,13,4,7,3,8,12,9,1,5
Output: 4,7,3,8,12,9,1 [4+7+3+8=12+9+1]
Could this be done with a complexity better than O(n^3)

Amazon
Amazon Interview Question for Software Engineer/Developer (Fresher) about Trees 5 PsychoCoder 1 day

What is the complexity of an algorithm to check whether a binary tree is symmetric or not. No need to check the data only the structure needs to be verified.

Amazon
Amazon Interview Question for Software Engineer/Developer (Fresher) about Algorithms, Arrays 7 PsychoCoder 1 day

Find least jumps to reach end of the array:
Given an array of Integers,if u are on ith element u can make max arr jumps. If i am at an element with value zero, i cannot move forward.find the least selection to reach end of the array.
ex: 1 3 5 8 9 2 6 7 6 8 9 starting with arr[0] i can only make one jump to 3, from 3 i can jump either 1 step 0r 2 steps 0r 3 steps.
my solution is 1 to 3 to 8, 3 selection and i am done.
Device an algo for this

Amazon
Amazon Interview Question for Software Engineer/Developer (0 - 2 Years) 2 PsychoCoder 1 day

given an array. find all the elements
which repeats more than once.

gave O(n) solution using hash, but
wants a better solution.

Amazon
Microsoft Interview Question for Software Engineer/Developer (Fresher) about Strings 4 agrawal25 1 day

Given a string in hex, convert it into int. Write test cases for the same.

Microsoft