![]() Number of employees invited N = 5 A a = -> Input Integer, array elements a. Given the number of employees, N, and their salaries in array a, he wants to find the optimal inefficiency, i.e., the smallest possible value for the inefficiency of arranging the N employees. Mike came across the term inefficiency of arrangement, which can be defined as the sum of the cost of tables + the total number of people getting into arguments. The only problem is that the employees with the same salary can get into arguments which can ruin the party. All the employees have to seat in the order of the index. Let’s say the cost of renting each table is K. ![]() But he is a little thrifty in that, he wants to adjust everyone in as few tables as he can. Mike has to arrange tables, where he will accommodate everyone. We will represent salary by an integer value. In this startup, everyone knows each other’s salary. These employees are indexed with an array starting from 1 to N. He has invited all of his fellow employees who are N in number. ![]() Mike has arranged a small party for the inauguration of his new startup. TCS Coding Question Day 1 Slot 1 – Question 1 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |