7. Suppose you have a set of N project managers and 2N software engineers. Each
ID: 3864519 • Letter: 7
Question
7. Suppose you have a set of N project managers and 2N software engineers. Each project manager is only willing to work with certain software engineers. The software engineers have no preferences. Design an algorithm to divide this group into N teams, each containing one project manager and two software engineers, such that the project manager preferences are not violated (i.e., no project manager has to work with a software engineer that they don’t want to work with).
Treat single arithmetic operations (addition, subtraction, multiplication, and division) as constant time operations.
Explanation / Answer
N project managers, 2N software engineers
Requirement: Design an algorithm to divide the group of project managers and software engineers in N teams such that each team has one project manager and two software engineers.
Algorithm:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.