Tip 1 : You should have in depth knowledge of your projects. Sometimes Adobe spend a whole interview in project discussion (in some cases).
Tip 2 : OOPS is a very important subject if you are preparing for Adobe. Also one should know real life examples of it and should be able to code any concept of it.
Tip 3 : One should have good knowledge of data structures. Mainly Array, Math, Tree, Recursion and LinkedList.
Tip 4 : According to me , projects just play role if you applying off campus and that too for the shortlisting of your resume as it gives you an edge in respect to other candidates. So if you are applying off campus you should have atleast 2-3 good projects in you resume.
Tip 1 : One should have good projects.
Tip 2 : The presentation of your resume should be really good. Bold keywords like tech stack you used or the topics you are really good at.
Timing : 11:00 am
Webcam was mandatory.
If the given array is [4, 2, 9] then you should print "3 5 6 7 8". As all these elements lie in the range but not present in the array.
I just run a loop from 1 till N
If ‘N’ = 4 and ‘ARR’ = [3, 5, 4, 2].
3 has 2 factors, which are 1 and 3.
5 has 2 factors, which are 1 and 5.
4 has 3 factors, which are 1, 2 and 4.
2 has 2 factors, which are 1 and 2.
Hence, the answer is [0, 0, 1, 0].
Step 1 : While n is divisible by 2, print 2 and divide n by 2.
Step 2 : After step 1, n must be odd. Now start a loop from i = 3 to square root of n. While i divides n, print i and divide n by i. After i fails to divide n, increment i by 2 and continue.
Step 3 : If n is a prime number and is greater than 2, then n will not become 1 by above two steps. So print n if it is greater than 2.
Timing : 10:00 am
Webcam was mandatory
I wrote a solution using Dynamic Programming.
Step 1 : initialize a 2 D matrix and assign a meaning to value (here in our case , possible paths from given point to bottom right corner)
Step 2 : I initialized the matrix using base cases (if one column or one row)
Step 3 : filled the matrix accordingly.
1. The heights of the buildings are positive.
2. Santa starts from the cell (0, 0) and he has to reach the building (N - 1, M - 1).
3. Santa cannot leave the grid at any point of time.
I used Dynamic programing.
Step 1 : initialized a 1-D array
Step 2 : initialized last index value to zero.
Step 3 : calculated minimum steps from n-2 index to n-1 index and till index = 0
Timing : 5 pm
Camera and mic was mandatory.
The interviewer was really nice and adjustable.
A string ‘B’ is a substring of a string ‘A’ if ‘B’ that can be obtained by deletion of, several characters(possibly none) from the start of ‘A’ and several characters(possibly none) from the end of ‘A’.
Two strings ‘X’ and ‘Y’ are considered different if there is at least one index ‘i’ such that the character of ‘X’ at index ‘i’ is different from the character of ‘Y’ at index ‘i’(X[i]!=Y[i]).
Step 1 : I used something similar to sliding window algorithm
Step 2 : I called a function which contains starting index of the string , an empty StringBuilder as it is mutable and an Arraylist to store indexes of all valid substrings as parameters.
Step 3 : declared a base case which states that the whole string is traversed.
Step 4 : declared some conditions,
(a) if the output String does not matches the length of the substring then append the character in output string (here output string is the StringBuilder we passed as parameter).
(b) if the length of output String got matched with given substring then compare the output string with substring.
if its matches then calculate its starting index and add it in the list.
and lastly remove first character from output string and add character at current index in output string and call the function recursively to check all the occurrences.
Input: Consider the following Binary Tree:
Output:
Following is the level-order traversal of the given Binary Tree: [1, 2, 3, 5, 6, 4]
I kept an counter to calculate the level and and performed level order traversal and applied a condition that if the level was odd I added the elements into the list in reverse order fashion.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which operator is used for exponentiation in Python?