i_learn
BAN USER
- 0of 0 votes
AnswersI attended a telephonic round for appstore testing and successfully cleared this round. Following was the 2nd question(apart from tell me abt yourself,etc):
- i_learn in India for for appstore
Give all testcases for creating and renaming a folder in a parent directory, say c drive| Report Duplicate | Flag | PURGE
Amazon Testing / Quality Assurance Android Application / UI Design test Testing - 1of 1 vote
AnswersI attended a telephonic round for appstore testing and successfully cleared this round. Following was the First question(apart from tell me abt yourself,etc):
- i_learn in India for for appstore
Give me all possible test cases for gmail registration page.| Report Duplicate | Flag | PURGE
Amazon Testing / Quality Assurance Android Application / UI Design System Design test Testing - 2of 2 votes
Answersgive me the code for :
Given a string say "I am a human being" the output should reverse all letters of each word but not the whole string as such.
Eg: O/p should be "I ma a namuh gnieb"
I somewhat wrote the code, but i was asked what if there are extra spaces etc.
(i am able to write the code sitting at my desktop at one short but there front of interviewer i am struggling. Need to build up my confidence)
let me know the best and optimised way of writing this code.
Also i suggest people to aviod using inbuilt functions as much as possible
My Answer is as below in perl
- i_learn in India#i want the reverse of the letters of all words in a string #eg Input is "I am a human being" then o/p shud be "I ma a namuh gnieb" $str="I am a human being"; @arr=split(' ',$str); print @arr; for($i=@arr-1;$i>=0;$i--) { $_=@arr[$i]; ####intead of above for loop if we use foreach(@arr) then it will reverse the whole string @word=split('',$_); { foreach $n (@word) { unshift(@final,$n); } } } print "\n @final \n";
| Report Duplicate | Flag | PURGE
Amazon Testing / Quality Assurance Algorithm Android Application / UI Design Arrays Automata Coding Data Structures Dynamic Programming Perl - 0of 0 votes
Answersgive me a code to find all anagrams or combnations of a given work.
- i_learn in India
Say if the word given was "hello"
then
hel
he
hell
leho
lleho
and so on| Report Duplicate | Flag | PURGE
Amazon Testing / Quality Assurance Algorithm Android Application / UI Design Arrays test Testing - 0of 2 votes
AnswersGiven an array say [0,1,2,3,5,6,7,11,12,14,20]
- i_learn in India
given a number say 5.
Now find the sum of elements which sum to 5
eg:2+3=5, 0+5=5 etc.
I guess the interviewer wanted all possible combinations eg 0+2+3=5, etc| Report Duplicate | Flag | PURGE
Amazon Testing / Quality Assurance Algorithm Android Application / UI Design Arrays Coding Data Structures Dynamic Programming Perl Sorting test Testing
I did give below code in perl which checks for sum of 7 in this case
@arr=(1,2,4,5,6,7,9,11,12,14,0,3);
$len=@arr;
foreach(@arr)
{
print "$_ \t";
}
print "\n";
for($i=0;$i<$len;$i++)
{
for($j=0;$j<$len;$j++)
{
if($i!=$j)
{
if($i+$j==@ARGV[0])
{
print "\@arr[$i] plus \@arr[$j] is equal to @ARGV[0] \n";
}
}
}
}
But he asked me to optimize it
as there were redundancy happenning.
I couldn't find the optimization there but when i came home a gave a try found that the following should have been used
use if($i<$j) instead of if($i!=$j) then it will print duplicate also say 7+0 =0 once and 0+7 is 0 which is not optimised.
If there is even more simpler code please share as mine doesn't implement checking for and comparing the sum of more than 2numbers like even 1+2 +4 =7
i like the point of u bringing in about "ignoring numbers greater than 5" .That is a simple way of reducing the computation :)
- i_learn April 11, 2014BTW how is this complexity calcuated . What do u mean by the solution would be O(N^2) etc . I am new to this