Write a mini package manager that can install software for you.
Think about using Homebrew (on macOS) and the advanced package tool (APT on Debian/Ubuntu)
to install software. The package manager resolves all dependencies and transitive
dependencies by querying a service and installs all required software in order.
As a mini package manager, think about the real-world case.
For example, user inputs:
apt install chrome fish
Given a dependency service, which has all direct dependencies of all software packages:
chrome -> wget, javascript, graphX
fish -> wget
firefox -> javascript, graphX
javascript -> gcc
// ... millions of other dependencies
zzzzzz -> bbbb, ddddd, xyz
Following software will be installed in order:
wget gcc javascript graphX chrome fish
This problem asks you to design a simplified package manager similar to Homebrew or APT.
At its core, it tests your ability to:
- Model software dependencies as a graph
- Resolve both direct and transitive dependencies
- Produce a correct installation order
- Reason about scalability in real-world systems