Company: Udaan
Difficulty: medium
The current selected programming language is C++14 . We emphasize the submission of a fully working code over partially correct but efficient code. Once submitted , you cannot review this problem again. You can use cout to debug your code. The cout may not work in case of syntax/runtime error. The version of GCC being used is 5.5.0 . Band Performance Position Tracking There are N members in a marching band. Each member of the band has been assigned a value from 1 to N and they are arranged in ascending order of their assigned value. The band is participating in a competition in which they have to complete Q performances. After one particular performance, the two band members who were called out by the instructor had to swap positions with each other until all Q performances have been performed. Now the instructor wants to know the ID of the band member who is at the K th position after Q performances. Write an algorithm for the band instructor to find the ID of the band member who is a