Amazon Interview Report
- 0of 0 votes
Answerswap to take one rotate a square matrix anticlock wise by 90 degree and add a particuler number after rotation to each prime column.
- pintuguptajuit(PINTU GUPTA) March 24, 2013 in India
function prototype should be..
void rotate(int a[][],int size, int keytobeadded);...
sample test case....
input
size=3
keytobeadded=5;
square matrix :
1 2 3
4 5 6
7 8 9
output should be
3 11 9
2 10 8
1 9 7...........| Report Duplicate | Flag | PURGE
Amazon Intern Algorithm - 0of 0 votes
Answerswaf for a linked listed ..
- pintuguptajuit(PINTU GUPTA) March 24, 2013 in India
shift all digit to first then consonant then vowel ..
such that list contain only one time one digit , consonant , vowel ..
List *(List *head);
input :
2->a->5->a->2->b->o->n->5->n.
output..
2->5->b->n->a->o..| Report Duplicate | Flag | PURGE
Amazon Intern Algorithm - 0of 0 votes
Answerswap to find the longest arithmetic sequence in given array... return number of element in seriese...
- pintuguptajuit(PINTU GUPTA) March 24, 2013 in India
simple test case..
sizeofarray=4
array element
3 4 5 8
output
3
sample test case
size of array =10
array element..
-1 1 3 7 11 15 19 20 21 22
output
5| Report Duplicate | Flag | PURGE
Amazon Intern Algorithm