rahulkumar5july
BAN USER- 0of 0 votes
AnswersA large file is given you have to find all the anagrams ??
- rahulkumar5july in United States| Report Duplicate | Flag | PURGE
Amazon - 1of 1 vote
AnswersGiven a Folder path in a Directory Structure. E.g. “temp/reg”; you need to find all the files with extensions “.c” in this folder as well as in the sub-folders.
- rahulkumar5july in United States
Source:
http://www.geeksforgeeks.org/amazon-interview-experience-194-for-software-support-engineer/| Report Duplicate | Flag | PURGE
Amazon - 0of 0 votes
AnswersGiven a list a1,a2,a3….an. Comparison between elements is given like a1>a2, a3>a5, a4>a2…..etc. Find whether there are any situations that we can sort the list in to the ascending order on the basis of comparison. Yes or No , explain the conditions
- rahulkumar5july in United States| Report Duplicate | Flag | PURGE
Adobe - 0of 0 votes
AnswersCreate an employee database structure in which Employee has id, name, manager. Three functionalities required were
- rahulkumar5july in United States
a) Given any id return all the employee details
b) Given any name(or id) list all the subordinates of the given employee.
c) Given a name search with prefix search property
We can use trie,make trie with names of employee,and store information of employee when name finish in trie,with this make a hashmap that hash id as key and name as value.
1st and 3rd condition is satisfied,but how to do 2nd ?
Any other approach that we can do?
only approach,no need of code.| Report Duplicate | Flag | PURGE
Amazon - 1of 1 vote
AnswersGenerate n numbers in ascending order which are having given k factors.
- rahulkumar5july in United States
Eg. {2,3,4,7}
then it generate number like this.
2,3,4,6,7,8,9,10 .....
My approach is that make a min heap with given k factors.In every iteration extract one element from heap to output and put next multiplication of outputed number to min heap.
For duplicate numbers we can take an array or hashmap for denoted that number is taken or not.
My question is,How can we handle duplication without extra space.
Or any other good approach for this question ?| Report Duplicate | Flag | PURGE
Adobe Technical Support Engineer - 0of 0 votes
AnswerCan we tell in almost constant time that a perticuler array dont have majority element ?
- rahulkumar5july in United States| Report Duplicate | Flag | PURGE
Adobe SDE1
35 is multiple of 7 and is not generated,reason is that we multiply given factors with generated numbers,and 5 is not generated so 35 is not generated,that why i am multiply numbers by i=1,2,3,4...... in my approach.
- rahulkumar5july July 07, 2015and for handle duplicates we can take an hash array.
My question is how to handle duplicates without extra space.