Adobe Coding Questions and Answers 2023

Adobe Sample Coding Questions and Answers

Adobe Coding Questions and Answers 2023 and Sample Mock Test Paper are available on this page. We have discussed the latest sample Coding questions along with solutions to practice in different languages.

As Adobe is a dream company for many students, it is important to understand the Adobe Exam pattern, syllabus, and whole recruitment process in detail.

adobe coding

Adobe Coding Questions and Answers 2023 Pattern

If you are interested in Adobe Recruitment then you have come to the right place, here we have updated the pattern of Adobe Recruitment exams. Go through the page for the details of the Adobe Recruitment process.

Section NameTotal QuestionsTime Limit
Quants20 Questions20 mins
Logical Reasoning20 Questions20 mins
Verbal English20 Questions20 mins
Online Coding3 Questions60 mins
Total63 Questions120 mins

Adobe Eligibility for 2023

Here we have mentioned Adobe Eligibility Criteria in Tabular Form. Go through the table to get more details:
AdobeRequirements
QualificationB.Tech/B.E
Eligible YOPStudent pursuing their pre final or final year
Percentage CriteriaMinimum 70% in class X and XII
BacklogNo Active Backlog

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Adobe Previous Years Coding Questions and Answers

Question 1 : Guess the word


Problem Statement :
Kochouseph Chittilappilly went to Dhruv Zplanet , a gaming space, with his friends and played a game called “Guess the Word”.

Rules of games are :
Computer displays some strings on the screen and the player should pick one string / word if this word matches with the random word that the computer picks then the player is declared as Winner.
Kochouseph Chittilappilly’s friends played the game and no one won the game. This is Kochouseph Chittilappilly’s turn to play and he decided to must win the game.
What he observed from his friend’s game is that the computer is picking up the string whose length is odd and also that should be maximum. Due to system failure computers sometimes cannot generate odd length words. In such cases you will lose the game anyways and it displays “better luck next time”. He needs your help. Check below cases for better understand

Sample input 1:
5 → number of strings
Hello Good morning Welcome you
Sample output 1:
morning
Explanation:
Hello → 5
Good → 4
Morning → 7
Welcome → 7
You → 3
First word that is picked by computer is morning

Sample input 2:
3
Go to hell
Sample output 2:
Better luck next time
Explanation:
Here no word with odd length so computer confuses and gives better luck next time

Question 2 : Share Holder (R -> Hard)

Problem Statement  :
Ratan is a crazy rich person. And he is blessed with luck, so he always made the best profit possible with the shares he bought. That means he bought a share at a low price and sold it at a high price to maximize his profit. Now you are an income tax officer and you need to calculate the profit he made with the given values of stock prices each day. You have to calculate only the maximum profit Ratan earned.
Note that:
Ratan never goes into loss.

Example 1 :
Price=[1,6,2]
Ratan buys it on the first day and sells it on the second.
Example 2 :
Price=[9,8,6]

The Price always went down, Ratan never bought it.

Input Format:
First line with an integer n, denoting the number days with the value of the stack
Next n days, telling the price of the stock on that very day.

Output Format:
Maximum profit done by Ratan in a single line.
Constraints:
Number of days <=10^8

Sample Input for Custom Testing:

STDIN
7
1
9
2
11
1
9
2

Sample Output :

10

Explanation :

The maximum profit possible is when Ratan buys it in 1 rupees and sells it in 11.

Question 3 : Devil Groups (R->Easy)

Problem Statement  :
There are some groups of devils and they splitted into people to kill them. Devils make People to them left as their group and at last the group with maximum length will be killed. Two types of devils are there namely “@” and “$”
People is represented as a string “P”

Input Format:
First line with the string for input

Output Format:
Number of groups that can be formed.

Constraints:
2<=Length of string<=10^9


Input string
PPPPPP@PPP@PP$PP

Output
7

Explanation
4 groups can be formed
PPPPPP@
PPP@
PP$
PP

Most people in the group lie in group 1 with 7 members.

Question 4 : Minimum Occurrence (R->Medium)

Problem Statement  :
Given a sting , return the character that appears the minimum number of times in the string. The string will contain only ascii characters, from the ranges (“a”-”z”,”A”-”Z”,0-9), and case matters . If there is a tie in the minimum number of times a character appears in the string return the character that appears first in the string.

Input Format:
Single line with no space denoting the input string.

Output Format:
Single character denoting the least frequent character.

Constraints:
Length of string <=10^6

Sample Input:
cdadcda

Sample Output:
c

Explanation:
C and A both are with minimum frequency. So c is the answer because it comes first with less index.

 

Question 5 : Array Subarray

Problem Statement  :
You are given an array, You have to choose a contiguous subarray of length ‘k’, and find the minimum of that segment, return the maximum of those minimums.
Sample input :
1 → Length of segment x =1
5 → size of space n = 5
1 → space = [ 1,2,3,1,2]
2
3
1
2

Sample output :
3
Explanation :
The subarrays of size x = 1 are [1],[2],[3],[1], and [2],Because each subarray only contains 1 element, each value is minimal with respect to the subarray it is in. The maximum of these values is 3. Therefore, the answer is 3

Question 6 : Vowel Encryption

Problem Statement  :

There is an encryption game going on. You will be given a number. If a digit is prime, it will take a vowel. Otherwise it will take a consonant value.
By this process, you have to make the string the lexicographically smallest possible. For a given number, print the output as a string.;

Input Format:
An integer n denoting the number.
Output Format:
The encrypted word.

Sample Input: 123421
Sample Output: baecab

Question 7: Fountains Installation

Problem Statement : Fountains are installed at every position along a one-dimensional garden of length n. Array locations[] represents the coverage limit of these fountains. The ith fountain (where 1sisn) has a coverage limit of locations[i] that can range from the position max((i – locations[i]), 1) to min((i + locations[i]), n ). In other words, the h fountains do not reach outside the boundaries of the garden. In the beginning,all the fountains are switched off. Determine the minimum number of fountains that need to be activated to cover the n length garden by water.

Example :

  • n = 3
  • locations[] = {0, 2, 13, then
    • For position 1: locations[1] = 0, max((1 – 0),
      • 1) to mini (1+0), 3) gives range = 1 to 1
    • For position 2: locations[2] = 2, max((2-2),
      • 1) to min( (2+2), 3) gives range = 1 to 3
    • For position 3: locations[3] = 1, max( (3-1),
      • 1) to min( (3+1), 3) gives range = 2 to 3

For the entire length of this garden to be covered, only the fountain at position 2 needs to be activated.

Function Description :

Complete the function fountainActivation in the editor below.

fountainActivation has the following Parameter:

  • int locations[n]: the fountain locations

Returns :

  • int: the minimum number of fountains that must be activated

Constraints :

  • 1<_n<_ 10^5
  •  O<_locations[i] <_ mini (n,100) (where 1 <_1<_10^5)

► Input Format For Custom Testing

Sample Case 0 :

Sample Input For Custom Testing :

  • 3 ->locations[] size n = 3
  • 1 ->locations[] [1, 1, 1
  • 1 ->Sample Output

Sample Output :

  • 1

Explanation :

Here, locations = {1, 1, 13

  • For position 1: locations[1] = 1, maxi (1 -1), 1) to min((1+1), 3) gives range = 1 to 2
  • For position 2: locations[2] = 1, max( (2 -1), 1) to min( (2+1), 3) gives range = 1 to 3
  • For position 3: locations[3] = 1, max((3 -1), 1) to min((3+1), 3) gyes range = 2 to 3

If the 2nd fountain is active, the range from position 7 to 3 will be covered. The total number of fountains needed is 1.

Question : 8 Candies

Problem Description

Question:- Krishna loves candies a lot, so whenever he gets them, he stores them so that he can eat them later whenever he wants to.

He has recently received N boxes of candies each containing Ci candies where Ci represents the total number of candies in the ith box. Krishna wants to store them in a single box. The only constraint is that he can choose any two boxes and store their joint contents in an empty box only. Assume that there are an infinite number of empty boxes available.

At a time he can pick up any two boxes for transferring and if both the boxes contain X and Y number of candies respectively, then it takes him exactly X+Y seconds of time. As he is too eager to collect all of them he has approached you to tell him the minimum time in which all the candies can be collected.

Input Format:

  • The first line of input is the number of test case T
  • Each test case is comprised of two inputs
  • The first input of a test case is the number of boxes N
  • The second input is N integers delimited by whitespace denoting the number of candies in each box

Output Format: Print minimum time required, in seconds, for each of the test cases. Print each output on a new line.

Constraints:

  • 1 < T < 10
  • 1 < N< 10000
  • 1 < [Candies in each box] < 100009
S. No.InputOutput
11
4
1 2 3 4
19
21
5
1 2 3 4 5
34

Explanation for sample input-output 1:

4 boxes, each containing 1, 2, 3 and 4 candies respectively.Adding 1 + 2 in a new box takes 3 seconds.Adding 3 + 3 in a new box takes 6 seconds.Adding 4 + 6 in a new box takes 10 seconds.Hence total time taken is 19 seconds. There could be other combinations also, but overall time does not go below 19 seconds.

Explanation for sample input-output 2:

5 boxes, each containing 1, 2, 3, 4 and 5 candies respectively.Adding 1 + 2 in a new box takes 3 seconds.Adding 3 + 3 in a new box takes 6 seconds.Adding 4 + 6 in a new box takes 10 seconds.Adding 5 + 10 in a new box takes 15 seconds.Hence total time taken is 34 seconds. There could be other combinations also, but overall time does not go below 33 seconds.

Question 9 : Password Hacker

Problem statement :

Elliot made a KeyLogger for his friend Romero, so that he can see the passwords of his friend. Keylogger is a software that can tell you the buttons pressed in the keyboard without the consent of the user, and hence unethical. Elliot made it to hack Romero’s passwords. The one problem is, Romero writes the passwords in lowercase characters only, and the keylogger only takes the values of the keys. Like, for a it takes 1, for b 2, and for z 26. For a given number Elliot produces all combinations of passwords in a dictionary and starts a dictionary based password attack. For a given number, print all the possible passwords in a lexicographic order.

Input Format:

One line, denoting the value given by the keylogger

Output Format:

All possible combinations of keyloggers in new lines are lexicographically ordered.

Constraints:

2<=Number of digit in input<=1000

Sample Input:

1234

Sample Output:

abcd

axd

Mcd

Explanation:

For 12, you can take 1,2 that is ab, or you can take l.

Question 10 : Maximum Revenue

Problem statement : Amit is a salesman who wishes to know the maximum revenue received from a given item of the N products each day . Amit has a sales record of N products for M days.Helo amit to find the highest revenue received each day.

Input : 

  • The first line of the input consists of two space-separated integers- day(M) and item(N) representing the days and the products in the sales record.
  • The next M lines consist of N space separated integers representing the sales revenue from each product each day.

Output: 

  • Print m space-separated integers representing the maximum revenue received each day .

Example Input:

  • 3 4
  • 101 123 234 344
  • 143  282 499 493
  • 283 493 202 304

Output:

  • 344 499 493

Explanation:

  • The maximum revenue received on the first day is 344 , followed by a maximum revenue of 499 on the second day and a maximum revenue of 493 on the third day.

Overall Analytics for Adobe

Adobe Coding Questions
Total Question

63

Adobe Coding Questions Watch
Total Time

120 Mins

Adobe Coding Questions magnifier
Exam Pattern

Non-Adaptive

Adobe Coding Questions analytics
Difficulty

Moderate to High

FAQs on Adobe Coding Questions with Solutions

Question 1: What is the eligibility criteria for Adobe?

Eligibility criteria for Adobe is:-

  • BE/B.Tech
  • Minimum 70% in X and XII
  • No backlogs
Question 2: How to prepare for the Adobe Coding Round?

Adobe asks three coding questions in the Online Assessment round. You can prepare them on this page.

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others