Shyam
BAN USER- 1of 1 vote
AnswersPrint words of given string in reverse:
- Shyam in India for Kindle
"This is test" -> "test is This"| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer - 0of 0 votes
AnswersWrite code for finding first duplicate element in given array:
- Shyam in India for Kindle
[4,3,1,2,5,9,5,4]
output : 5 (not 4)| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer - 0of 0 votes
AnswersLets say there is a device which gets push message for update from server (like android mobile gets) and it switches between wifi and 3G. Write all possible test scenario (negative that might occur in real world, like server gows down etc..)
- Shyam in India for Kindle| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer test Testing - 0of 0 votes
AnswersLets say there are multiple webservers using single database server on different machine, if someday site response become slow, write all possible test cases that can be written to test/debug this.
- Shyam in India for Kindle| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer test Testing - 0of 0 votes
AnswersWrite test scenario for installer of application on windows, which require internet during installation.
- Shyam in India for Kindle| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Testing - 0of 0 votes
AnswersPrint words of given string in reverse order:
- Shyam in India for Kindle
"This is test"
Output: "test is This"| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Algorithm - 2of 2 votes
AnswersPrint array in spiral
- Shyam in India for Kindle
123
894
765
Output: 123456789| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Algorithm
public static void fPrintDuplicate(int []arr) {
- Shyam July 26, 2014//Time complexity is more, as all elements till end needs to be worked
int asum=0;
int n = arr.length;
int esum = n*(n+1)/2; //expected sum;
for(int i=0;i<arr.length;i++)
asum += arr[i];
System.out.println("esum="+esum); //expected sum;
System.out.println("asum="+asum); //actual sum
int missing = n - (asum+1 - esum) ;
System.out.println("Missing number = "+missing);
int duplicate = missing - 1;
System.out.println("Duplicate number = "+duplicate);
}