## Adobe Interview Questions

- 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.

- -1of 1 vote
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)

- 0of 0 votes
ATM has x currency notes of 100 rupee,y currency notes of 500 rupee,and z currency notes of 1000 rupee notes.

Customer wants to withdraw n amount at any given time. as per bank rules,Customer can not withdraw more than INR.40000/-per transaction.

If ATM is running out of cash it should throw a message that insufficient Balance, Kindly enter multiple of m value of currency note.where m>=4000 and m<=total number of cash available in ATM.

An intelligent banker has found in customer survey that customer prefers to receive more than 5 currency notes 100 rupee,more than 2 currency noes of 500 rupee and rest of the currency notes is of 1000 rupee where ever possible.

If amount is less than 500,customer will receive 100 rupee currency notes. Bankers goal is to tender the minimum number of currency notes to save customer waiting time and increase customer satisfaction by following customer survey.Banker has hired you to program ATM dissaptch function.

FOR Example: Lets ATM has 200 currency notes of 100 rupees,90 currency notes of 500 rupee and 50 currency notes of 1000 rupee.Customer has placed a withdrawal request of Rs 22,200.00. Dispatch function has given him 7 currency notes of 100,3 currency notes of 500 and 20 currency notes of 1000 rupee

- 1of 1 vote
Given-an-array-of-length-n-having-integers-0-to-n-1-in-unsorted-order-we-have-to-modify-this-array-such-that-the-value-at-a-n-becomes-a-a-n-for-example-if-a-0-contains-5-then-a-0-will-have-value-a-5-and-so-on-condition-is-that-this-should-take-O-n-time-complexity

- -1of 1 vote
https://www.quora.com/Given-an-array-of-length-n-having-integers-0-to-n-1-in-unsorted-order-we-have-to-modify-this-array-such-that-the-value-at-a-n-becomes-a-a-n-for-example-if-a-0-contains-5-then-a-0-will-have-value-a-5-and-so-on-condition-is-that-this-should-take-O-n-time-complexity

- 0of 0 votes
A company is trying to find best possible optimal solution for servicing his customer base of 300 with 12 employee.

They want a technology solution that tells how they will be able to meet customer requirement as business will grow and other changes like location of customer changes, new locations added and so on.

Problem is basically a form of Travelling Salesman Problem ( TSP ) or Vehicle Routing problem ( VSP ). Following things need to be completed here.

1> Explain logistics involved in this problem into succinct business definition.

2> Different approach with which problem can be solved

3> One implementation of the problem ( proof of concept ), using customer base coordinates mentioned below. ( 0,0 ) is considered the company coordinate which is the starting point. ( preferably Java )

Here are coordinates with which working solution is expected provided in a text file as input:

X coordinate Y Coordinate

420 278

421 40

29 178

350 47

298 201

417 186

378 134

447 239

42 114

45 199

362 195

381 243

429 1

338 209

176 9

364 26

326 182

500 129

190 51

489 103

368 142

132 260

305 200

446 137

375 154

440 190

9 118

437 32

383 266

282 51

366 19

465 173

93 210

257 185

316 242

315 141

236 14

352 155

311 106

300 261

66 154

172 245

376 16

152 283

41 259

278 158

299 102

81 178

178 218

344 150

269 172

379 710

301 611

287 295

392 258

259 333

427 273

411 233

355 707

439 717

298 390

338 547

407 697

287 220

355 524

365 228

257 632

294 395

315 626

275 268

346 724

324 230

436 310

279 240

317 601

274 661

294 483

350 234

328 689

656 765

778 792

724 797

686 723

784 785

730 756

775 731

777 647

881 498

634 906

588 709

884 867

837 670

513 477

414 794

387 798

430 587

638 18

26 497

721 765

595 706

985 962

619 125

106 252

198 104

554 91

11 875

757 386

378 253

719 878

561 969

36 821

179 442

31 814

710 103

8 168

401 304

913 921

983 250

100 727

0 425

114 900

337 977

709 808

107 435

442 488

68 42

826 967

771 399

460 831

520 83

530 406

727 406

58 195

732 240

512 974

438 366

184 954

423 905

549 923

433 292

395 237

764 73

698 503

146 536

200 211

48 38

31 39

60 37

41 38

71 37

54 39

23 35

73 38

67 33

45 39

47 34

69 30

39 34

52 38

28 30

949 892

959 909

966 930

993 923

925 887

946 888

998 951

931 894

966 839

959 812

986 965

946 979

927 800

979 803

987 980

983 975

993 858

936 851

998 912

993 939

997 916

1000 832

975 898

919 882

916 883

980 974

975 902

996 808

999 864

991 829

995 985

982 926

13 690

23 525

10 864

15 283

2 149

3 580

8 299

16 361

- 0of 0 votes
c program using single linked list.

Assume m nodes means 100 or 200 but we dont know exact.

print element m-4 node.

Example: if m is 100 node print 96 node data

- 0of 0 votes
C program to accept two strings and print characters which are not present in first string.

Example: 1 string: apple

2 string: aeroplane

output: ro

- 2of 2 votes
There are 10 coin producing machines which produces a coin of weight x grams. Out of those, 2 machines are defective and produces coins of x-1 grams. How to find those two defective machines.

Then extend this question to a total of n machines and out of those m machines are defective.