Flipkart Coding Question – Solved

9 Live
Recruitment Software - Application Display Update There are N applicants who have applied for a job vacancy. Each applicant has an application ID ranging from 1 to N. During the initial round of recruitment, the company's software assigns each applicant a score value, which can be positive or negative: - A positive score indicates the applicant is qualified for the vacancy. - A negative score indicates the applicant is not qualified and is not visible to the recruiter. Recruiter's Request The recruiter wants access to all N applications, but they have a constraint of performing a maximum of K iterations to change the score values. Operations Allowed In each iteration, the recruiter can change the score value of the ith applicant from positive to negative or negative to positive. If there is an (i+1)th applicant, the software automatically changes their score as well. The goal is to ensure that all N applicants become visible to the recruiter in at most K iterations. Input Format First line: An integer application_size (N), representing the total number of applicants. Second line: N space-separated integers, representing the score values of all N applicants. Third line: An integer iterations (K), representing the maximum number of iterations allowed. Output Format Print space-separated integers, representing the application IDs whose scores must be changed by the recruiter in order to make all N applications visible.

Asked in: Flipkart

Image of the Question

Question Image Question Image

All Testcases Passed βœ”



Passcode Image

Solution


Please login to view the solution


Related Questions

| The supply chain manager at one of Amazon's warehouses is shipping the last con… |
| Determine the highest value after executing n steps on an infinite 2D grid that… |
| Amazon Prime Video is developing a new feature called "Segmentify." This featur… |
| In this new stock prediction game launched on Amazon Games, Player 1 provides P… |
| Amazon operates numerous warehouses, with each warehouse holding inventory[i] u… |
| In Amazon's highly efficient logistics network, minimizing operational overhead… |