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
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
How to find out the position of a msb in a number? 1 PsychoCoder 12 hours

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

Do not use in built log function or __builtin_clz

Amazon Banglore Online Written 5 javanetbeans 16 hours

You are given a function printKDistanceNodes which takes in a root node of a binary tree, a start node and an integer K. Complete the function to print the value of all the nodes (one-per-line) which are a K distance from the given start node in sorted order. Distance can be upwards or downwards.

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 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 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
Google Interview Question for Software Engineer/Developer (Fresher) about Algorithms 3 deeptigp 2 days

Generate prime Number in range of [a,b] , more concentrate on Time Complexity of Algorithm How its O(nlognlog(logn)) Can Anyone explain in detail ?

Google
MindTree Interview Question for Software Engineer/Developer (Fresher) about Algorithms 1 kartik_patil 2 days

Given a log file that contains latency for each request of an API, how to calculate the median of the API latency?

MindTree
MindTree Interview Question for Software Engineer/Developer (Fresher) about Algorithms 1 kartik_patil 2 days

Given a log file that contains latency for each request of an API, how to calculate the median of the API latency?

MindTree
Amazon Interview Question for Software Engineer/Developer about Algorithms 1 kartik 3 days

\Round5 | Q2 : Suppose, Amazon have a Logging system Like This:

They Track all logs daily basis, stored in separate log file.Log contains a collection of tuples of Customer ID and Page ID. The length of Customer ID and Page ID is L1 and L2. Suppose We have a log of D-days , and size of each log fine can be Order of n , where n be the number of customer.
In a most generalized situation, you can assume that a customer can visit the same page multiple times in a day or any number of...

Amazon
Describe how to get the top k queries from a search log of terabytes of data. 2 kartik 4 days

Describe how to get the top k queries from a search log of terabytes of data. Memory/Disk per machine is limited but you can use multiple machines.

Amazon Interview Question for Software Engineer/Developer (0 - 2 Years) 6 PsychoCoder 5 days

The next highest number in the given sequence
ex: input:213476-->213467
54321--> -1

Amazon
TIME COMPLEXITY PROBLEM 2 kartik 6 days

What will be the time complexity T(n) and space complexity S(n) of the following Algorithm?
How can we build a recursion tree for the same?

Large(n)
{
        If(n<=1)
              Return n;'
         Sum = 0;
         For i= 1 To n-1
               Sum = Sum + Large(i);
         Return Sum;
}
Amazon Interview Question for Software Engineer/Developer about Algorithms, Bit Magic 13 atul007 6 days

An array A[1...n] contains all the integers from 0 to n except for one number which is missing. 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. Write code to find the missing integer. Can you do it in O(n) time?

Amazon