Flipkart Coding Question – Solved

11 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

| Given an n x m grid, where rows are numbered from 7 to n and columns from 1 to … |
| There are 'N' coders standing in a line, where i denotes the ith position of a … |
| A birthday party was attended by N number of kids, and each kid was given a uni… |
| Given a matrix of size m * n, where m denotes the number of rows (starting with… |
| A traveler is traveling from the city of Zeta to Omega. He starts with X amount… |
| As an operations engineer at Amazon, you are responsible for organizing the dis… |