Company: Flipkart
Difficulty: medium
The current selected programming language is C++20 . 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 . Network Message Sequence Selection A networking company devises processes to control network traffic. A server in the network is connected to N devices. The devices are numbered from 0 to N-1. Recently, the team has devised a process in which the server receives messages from N devices for transmission then the process generates M possible sequences of messages from all devices among which one can be used during the initial operation. In every sequence, a count of messages is selected from the received messages for every device. The generated sequences are numbered from 0 to M-1. To select a sequence first the highest count of messages among all sequences