Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
966 views

All past online assesments  of Adobe  can be found using the tag "adobe_oa" in the search bar.

Here is the link : https://www.desiqna.in/tag/adobe_oa

in Online Assessments by Expert (35,210 points) | 966 views

1 Answer

0 like 0 dislike
Tan is a school teacher. Her manager Taru asks her to bring the maximum number of students from his class where there are at max X pair of adjacent students whose heights is not the same. In similar words Tan has to find the maximum number of students standing in ascending order of their height such that there are only X adjacent pair of students whose height are not the same.

 

1<=n<=1000
1<=array element <=1000
1<=X<=1000

 

What could be the optimal solution?
by Expert (35,210 points)

Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .