Amazon Interview Report
- 0of 0 votes
Answersinput: "kitten%20pic.jpg"
- ajay.raj March 05, 2018 in United States
output: "kitten pic.jpg"
%20 -> ' '
%3A -> '?'
%3D -> ':'
modify your input in place.
no string library functions.
void Decode(char[] str)| Report Duplicate | Flag | PURGE
Amazon Java Developer - 0of 0 votes
AnswersGiven a string T of length n, partition it in n' "phrases" (p1, p2, ..., pn'),
- ajay.raj March 05, 2018 in United States
such that
pi = pj + c, for some j<i, where + is string concatenation and c is a character
p0 = ''
p1 = pj + c where j < 1
T = p1 + p2 + ... + pn'
For example:
T = aababcabcd = a + ab + abc + abcd
p1 p2 p3 p4| Report Duplicate | Flag | PURGE
Amazon Java Developer - 0of 0 votes
AnswersPrint a binary tree in vertical order using singly linked list...
- ajay.raj March 05, 2018 in United States| Report Duplicate | Flag | PURGE
Amazon Java Developer - -1of 1 vote
AnswerGiven:
- ajay.raj March 05, 2018 in United States
R number of Red Cards
B number of Black cards
K
Cards needs to be placed in a circle. Start from a position and for
every K moves remove that card And
repeat the process until all the cards are eliminated.
Question: Position the cards such that the red cards are completely
eliminated before the blacks cards are selected for elimination.| Report Duplicate | Flag | PURGE
Amazon Java Developer - 0of 0 votes
AnswersGiven a BST convert it into new Data Structure that satisfies following conditions:
1. every leaf node's left ptr point to its parent and right ptr points to the next leaf
2. every non leaf node's left ptr points to its parent and right ptr is NULL
3. return the head and print the new DSexample: 7 / \ 5 9 / \ \ 4 6 10 output: head->4->5->7 | ->6->5->7 | ->10->9-7
with optimal time and space complexity
- ajay.raj March 05, 2018 in United States| Report Duplicate | Flag | PURGE
Amazon Java Developer