Company: Thoughtspot
Difficulty: medium
2. Hotspot Connections There are employee_nodes employees in a company, out of which there are k special employees who have data network and share their mobile hotspots with other employees. There are employee_edges connections already made between the employees, where the i th connection connects the employees employee_from[i] and employee_to[i] , such that either of the employees can share a mobile hotspot. Two employees x and y are connected if there is a path between them. All the employees connected to a special employee x will use the mobile hotspot of the special employee x . Up to now, to restrict data usage, any employee was connected to at most one special employee. As data consumption has increased, any employee can be connected to at most max_connections number of special employees. Find the maximum number of edges that can be added to the graph such that any employee is connected to at most max_connections special employees. Function Description Complete the function getMa