## Adobe Interview Questions

- 0of 0 votes
Given a math expression in string format that contains only + & - and numbers. Return the sum in integer format. Eg: Input: "3+4-7+13" Output: 13.

"2+1-8+13" Output: 8

- 0of 0 votes
double the array element if if two element is same make first element double and second element 0 move all zero end

ex I/P; 2,2,0,4,8,0,0

O/P: 4,4,8,0,0,0,0

- 0of 0 votes
Well design a master controller/scheduler which should be configurable and capable of running multiple processors at a same time

Scheduler Operation :-

scheduler process should be able to perform various operations below are the examples

1. execute sql queries and stored procedures in the database

2 should be able to send emails with given set of arguments and attachment to business

3 should be able to send ftp files based on input arguments

4 should be able to execute batch files

process should have below capabilities

Process Operation :-

1 Remotely start/stop a child process

2 Raise alerts when any above process fails

3 Automatically restart the process if it fails

4Remotely kill a child process that breaches a pre set timeout limit

so for scheduler and processor I have to come to design with

1 High level design

2 Class level diagram

3 Design should be flexible t incorporate more operations

4 any design pattern you think we can use

- 0of 0 votes
We were given an array. Values of the array were memory sizes and the memory that is required by the system can only be represented in powers of We had to return the size of the memory required by the system.

Ex: – arr = {2,1,4,5}

Total = 12

So, memory required =16

- 0of 0 votes
Given an array arr[], find the maximum j – i such that arr[ j ] > arr[ i ]

- 0of 0 votes
Given two arrays find the min in first array and max in the second array and return the product of the two elements

- 0of 0 votes
Count number of ways to paint a fence with N posts using K colors, where no FOUR consecutive fences can have the same color.

- 0of 0 votes
here are tuples given for each users of a website (Si,Ei) where Si denotes the when the user entered the website and Ei denotes when the user exits the website .Find the maximum number of users active of website at any time duration.

- 0of 0 votes
There is a binary stream coming . You need to print true or false based on the fact whether the number formed is divisible by 5 or not.

- 0of 2 votes
I am looking for a good resource to learn lossy counting sticky sampling.Can anyone point me towards good resource?I am ready for a one-to-one session too.

- 0of 0 votes
There are some professors, some courses, and some students.

Each professor can teach only a single course.

Each course has a fixed duration(Eg. 10 weeks).

For each professor, you are given time availability schedule(assume week wise).

Each student has a list of courses he wants to learn.

There can be only 1:1 classes, i.e., 1 professor can teach only a single student.

A student can attend only one course at a time.

A professor has to finish teaching a course in a one go.

Your aim is to prepare a schedule so that all courses are taught in the least time.

- 0of 0 votes
Given a stream of numbers which contains n numbers, each number is positioned at max k positions away from its actual position. Sort the array in the most optimized way.

- 2of 2 votes
We have to merge a set of Intervals.How to decide if to sort them on start or end time? Which one is better to sort based on start or end time?

- 0of 0 votes
Given a robot which is on Origin in a number line and a string that contains either ‘L’ , ‘R’ or ‘?’. ‘L’ means turn left and ‘R’ means turn right. ‘?’ can be assumed to be ‘L’ or ‘R’. Find the maximum distance from origin the robot can go at any point of time.

- 0of 0 votes
Given a robot which is on Origin in a number line and a string that contains either ‘L’ , ‘R’ or ‘?’. ‘L’ means turn left and ‘R’ means turn right. ‘?’ can be assumed to be ‘L’ or ‘R’. Find the maximum distance from origin the robot can go at any point of time.

- 0of 0 votes
Given a list L of numbers from 0 to n, and another number k = [0-9], find how many times k appears in L. If the target number in L is more than one digit, treat each digit separately. For example, k=0 appears twice in L = [0,10].

- 0of 0 votes
Given 2 numbers (where 6 can also be written as 5, and 5 as 6), calculate the maximum and minimum possible sum

Ex :

456 485

Min 455 + 485

Max 466 + 486

- 0of 0 votes
Find out the number of ways in which two queens can be placed in a 8*8 chessboard.

- 0of 0 votes
Find the possible (x,y) coordinates in a given 2-D chess board which are safe from the attack of a queen.

- 0of 0 votes
You are a string conscious guy. You categorise strings into 3 types: good, bad, mixed. If a string has 3 consecutive vowels or 5 consecutive consonants or both, it is bad. Else it is good. If a string has ‘?’, that can be replaced with any character. Thus, string ‘?aa’ can be bad if ‘?’ is vowel or good if consonant. Thus, it is mixed. Implement function which takes string s as input and returns good, bad or mixed

- 0of 0 votes
You are a musician who plays different songs at different volumes. You have a particular difference that needs to be present for new song, but you don't care if it is more or less. You are given initial volume l, array of volume changes where arr[i] is volume change required after i-th song, max_vol h (min vol always 0), array size n. You need to find the max possible volume for the last song. But if at any point change is not possible, return -1. Format: n, arr[n], l, h. Ex: 3, 1 1 1, 0, 5. Ans: 3. Ex: 4, 9 1 5 4, 8, 15. Ans: -1. Ex: 3, 5 3 7, 5, 10. Ans: 10.

Input explanation :

First number = size of array,

then next ‘n’ numbers of array.

Then ‘l’ means initial volume

Then ‘h’ means max volume.

Eg. 3, 1 1 1, 0, 5 means n = 3, arr = {1,1,1}, l = 0, h = 5,

Output explanation: initially you play music at vol 0, then for first arr element. Arr[0] inc. by 1,

Arr[1] inc. by 1, arr[2] inc by 1 total = 3

- 2of 2 votes
Given infinite supply of coins of denominations 25, 10, 5 and 1, find the distinct number of ways to use the coins to sum up to the given value

- 0of 0 votes
Given an array of integers where size of array can be large. Find if it is possible to make all elements of given array equal by multiplying elements with one or more input prime numbers.

e.g.

arr = 50, 200

primes to use = 2, 3

so possible by multiplying 50 by 2 * 2

e.g.

arr = 3, 5

primes to use = 7

not possible

- 0of 0 votes
I was asked this question:

Imagine you want to build a standalone app. This app let's user see the N nearest ATMs within the range. You can assume that the app will show ATMs within some range(like 1km * 1km square). You have baked-in the offline map of the city in the app itself - which means the app already know the locations of all the ATMs in the city. Assume that ATMs and your location to be 2d cordinates(x, y). Also you have stored the location of all the ATMs in the app itself. You need to find the best and most efficient way to find the nearest ATMs within the range.

You don't have to give the logic to find the distance between two points. You need to tell how can you filter out soo many ATMs within the city for a given range. You can assume that the region for which you want to show the location of the ATMs be a square/rectangle. The app knows your location everytime.

So basically the problem is - how will you store those ATMs coordinates in the app so that the app at any point can filter out N ATMs for you if they lie inside the region.

My solution was to have sorted x coordinates and sorted y coordinates pre computed. Now in the sorted x coordinates, Find all the x coordinates that lie within the range of the region's x coordinates for which you want to find the ATMs. Repeat the same for y coordinates. Now find the intersection of both the result. This will give you the result. But interviewer wanted more optimized approach. Any idea how to do better?

- -1of 1 vote
Consider a string, s = "abc". An alphabetically-ordered sequence of substrings of s would be {"a", "ab", "abc", "b", "bc", "c"}. If we reduce this sequence to only those substrings that start with a vowel and end with a consonant, we're left with {"ab", "abc"}. The alphabetically first element in this reduced list is "ab", and the alphabetically last element is "abc". As a reminder:

Vowels: a, e, i, o, and u.

Consonants: b, c, d, f, g, h, j, k, l, m, n, p, q, r, s, t, v, w, x, y, and z.

Complete the findSubstrings function in your editor. It has 1 parameter: a string, s, consisting of lowercase English letters (a − z). The function must find the substrings of s that start with a vowel and end with a consonant, then print the alphabetically first and alphabetically last of these substrings.

Input Format

The locked stub code in your editor reads a single string, s, from stdin and passes it to your function.

Constraints

3 ≤ length of s ≤ 5 × 105

Output Format

Your function must print two lines of output denoting the alphabetically first and last substrings of s that start with a vowel and end with a consonant. Print the alphabetically first qualifying substring on the first line, and the alphabetically last qualifying substring on the second line.

Sample Input 1

aba

Sample Output 1

ab

ab

Explanation 1

"ab" is the only possible substring which starts with a vowel (a) and ends with a consonant (b). Because we only have 1 qualifying substring, "ab" is both the alphabetically first and last qualifying substring and we print it as our first and second lines of output.

Sample Input 2

aab

Sample Output 2

aab

ab

Explanation 2

There are 2 possible substrings which start with a vowel and end with a consonant: "aab" and "ab". When ordered alphabetically, "aab" comes before "ab". This means that we print "aab" (the alphabetically first qualifying substring) as our first line of output, and we print "ab" (the alphabetically last qualifying substring) as our second line of output.

Sample Input 3

rejhiuecumovsutyrulqaeuouiecodjlmjeaummaoqkexylwaaopnfvlbiiiidyckzfhe

Sample Output 3

aaop

utyrulqaeuouiecodjlmjeaummaoqkexylwaaopnfvlbiiiidyckzfh

Explanation 3

There are 4830 substrings of s, but only 676 of them start with a vowel and end with a consonant. When ordered alphabetically, the first substring is "aaop" and the last substring is "utyrulqaeuouiecodjlmjeaummaoqkexylwaaopnfvlbiiiidyckzfh".

- 1of 1 vote
Given a binary tree, whose leaf nodes are connected,

1

/ \

2 3

/ \ /

4 5 6

Now 4,5,6 are leaf nodes in the above BT, 4->5->6

4's left is pointing to 6 and 6's right is pointing to 4. We have a circular DLL of leaf nodes.

We need to find the height of this tree?

- -1of 1 vote
Input: set of coordinates = [P1,P2,...,Pi,.....Pj,....Pn]

P denote Point(x,y)

Start point is any of set of coordinates like Pi

simily end point is also any of set of coordinates like Pj.

Find the shortest path with set of points between start and end points.

Let us have a simple example

Set of coordinates :

P4 P5 P6

P1 P2 P3 P7 P8 P9 P11 P12 P13

P10

Start Point: P2

End Points: p12

Output: P2,P3, P7,P8,P9,P11,P12

- -5of 5 votes
Did anyone from Bangalore attend Adobe's interview ?

Interviews were supposed to be organized in Bangalore on 23rd and 24th April 2016. Anyone ?

- 1of 1 vote
which number most unlikely belong to following set of number 9 23 46 75 116

- 0of 0 votes
Write test cases for siri mobileapp?or give me test cases for siri app9mobile)