Adobe Interview Question for Quality Assurance Engineers

Country: India
Interview Type: In-Person

Comment hidden because of low score. Click to expand.
1
of 1 vote

What company is this for?
Q3 is not possible to solve, you don't have any delimiters between the words.
Q1 and 2 can be solved in linear time.

Comment hidden because of low score. Click to expand.
0

In Q3, If we consider the element ' ' as a delimiter, we can solve this problem.

Comment hidden because of low score. Click to expand.
0

I assume there are 2 questions underlying

1) String reversal - O(n) : Navigate from begin and end and swap values
2) Reverse order of Words - O(2*n) : 2 step process , reverse the entire string & then reverse the characters of the individual words (space is the delimeter) in step 1 itself keep track of indices which mark end of strings

Comment hidden because of low score. Click to expand.
0
of 0 vote

What does it mean "just one bit extra"? Does that mean we are not allowed to iterate and not even use a counter?

Comment hidden because of low score. Click to expand.
0
of 0 vote

``````#include<stdio.h>
#define SWAP(a,b) (a^=(b^=(a^=b)))
int main()
{
char arr[] = {'F', 'I', 'N', 'D', ' ', 'M', 'I', 'N','D'}, ctr;
for(ctr=0; ctr < sizeof(arr)/2; ctr++)
SWAP(arr[ctr], arr[sizeof(arr) - 1 -ctr]);
return 0;
}``````

Comment hidden because of low score. Click to expand.
0
of 0 vote

``````char[] chars = new char[]{'a', 'b', 'c', 'd'};
int l = chars.length - 1;
int c = 0;
for(int i=0; i<=l/2;i++) {
char t = chars[l-i];
chars[l-i] = chars[i];
chars[i] = t;
c++;
}

System.out.println("Reversed String = " + new String(chars));
System.out.println("number of iterations = " + c);``````

Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.