Company: pace stock

Difficulty: medium

Problem Statement

Maximum Hotspot Connections There are employee_nodes employees in a company, numbered from 1 to employee_nodes . Out of them, k employees are special : they have a data network and share their mobile hotspots with other employees. There are employee_edges connections already made between the employees. The i -th connection joins the employees employee_from[i] and employee_to[i] , and either of the two can share a mobile hotspot over it. Two employees x and y are connected if there is a path between them. Every employee connected to a special employee x uses the mobile hotspot of x . Up to now, to restrict data usage, every employee was connected to at most one special employee. As data consumption has increased, an employee may now be connected to at most max_connections special employees. Find the maximum number of edges that can be added to the graph so that every employee is still connected to at most max_connections special employees. Notes The given graph contains no self-loops an

More pace stock OA questionsInterview experiences