sourabhd.bitm.ece2k8
BAN USER1. Checking the device system logs and application logs can give more information on what is happening.
2. Number of background services running on the phones might be different.
3. Number of background/foreground apps running on the phones might be different.
4. Available memory for the application under test might be different on the phones.
5. Available CPU time for this application might be different on the phones.
6. The version of application installed on the phones might be different.
7. Different permissions settings on the devices can cause application to crash.
8. Clock and other system settings could be different on the phones.
9. Cache on the devices could be different.
10. Battery available on the devices could be different.
Sample Input: The first line is the number of test cases.
7
1
25
26
27
51
52
676
Sample Output:
A
Y
Z
AA
AY
AZ
YZ
C++ Program
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
char out[27]={'Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y',0};
char ans[100]={0};
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
int j=0;
while(n>0)
{
int c=n%strlen(out);
//Using the remainder as the index of the character array.
ans[j]=out[c];
if(c==0)
{
n--;
}
n/=strlen(out);
j++;
}
//Reversing the answer string.
for(int i=0;i<strlen(ans)/2;i++)
{
char t=ans[i];
ans[i]=ans[strlen(ans)-i-1];
ans[strlen(ans)-i-1]=t;
}
cout<<ans<<endl;
}
return 0;
}
- sourabhd.bitm.ece2k8 January 02, 2016Ask following clarifying questions:
1. What is the maximum length of string that the server accepts?
2. What should be the behavior in case the length of the string is more than the maximum length allowed.
3. Does the server return date and time in some specific time zone? If so, which time zone?
4. What is the expected load on the server?
5. What is the acceptable latency requirements?
Once the interviewer clarifies the above questions, then start writing the tests:
1. Functional:
Invalid:
a. Try with an empty string.
b. Try passing Null as the input string.
Valid:
Check the correctness of response in all the below test-cases
c. Try passing strings with special characters.
d. Try passing strings with unicode characters.
e. Try dates which are on the last day of the month for all 12 months.
f. Try dates which are on the last day of February for a leap year and for non-leap year.
g. In case of time zone specific requirements, simulate user requests from geo locations in different time zones.
Boundary Value Tests:
h. Try passing string with length one less than the maximum allowed length.
i. Try passing string with length equal to the maximum allowed length.
j. Try passing string with length one more than the maximum allowed length.
2. Security:
a. Check for Denial of Service attacks.
b. Check for SQL and script injection vulnerabilities, by passing such strings as input.
c. What are the different ways, client can send request to the server?
3. Performance:
a. Try hitting the server with fixed number of concurrent requests and record the response time metrics.
b. Try hitting the server with large number of concurrent requests and see upto what load the server responds within an acceptable response time limit.
Convert all the taller than statements to shorter than or vice-versa. Then use Topological sorting.
- sourabhd.bitm.ece2k8 June 30, 2015
Time Complexity: O(n)
- sourabhd.bitm.ece2k8 April 10, 2016Space Complexity: O(1)
1. Find the minimum and maximum elements in the array.
2. Find the value of n/2*(amin + amax)
3. Find the sum of all the elements of the array.
If the values of steps 2 and 3 match, then it is an arithmetic sequence, else not an arithmetic sequence.