stephancom/depend
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
This was a programming assignment as part of a job interview. The goal is to handle a simple package dependency manager, perhaps similar to Bundler. Dependencies are maintained, installed as needed, and removed when no longer needed unless those same packages were installed explicitly Commands: DEPEND parent child1 [child2...] parent depends on children INSTALL package installs the given package and those on which it depends REMOVE package removes the given package and those on which it depends, unless they are required by other packages or were installed explicitly LIST lists installed packages END ends execution and exits Example Input DEPEND ALFA BRAVO CHARLIE DEPEND BRAVO CHARLIE DEPEND DELTA BRAVO CHARLIE DEPEND ECHO BRAVO FOXTROT INSTALL CHARLIE INSTALL ALFA INSTALL GOLF REMOVE CHARLIE INSTALL ECHO INSTALL DELTA LIST REMOVE ALFA REMOVE CHARLIE REMOVE DELTA REMOVE CHARLIE INSTALL CHARLIE REMOVE BRAVO REMOVE ECHO REMOVE BRAVO LIST END Output for the Example Output DEPEND ALFA BRAVO CHARLIE DEPEND BRAVO CHARLIE DEPEND DELTA BRAVO CHARLIE DEPEND ECHO BRAVO FOXTROT INSTALL CHARLIE Installing CHARLIE INSTALL ALFA Installing BRAVO Installing ALFA INSTALL GOLF Installing GOLF REMOVE CHARLIE CHARLIE is still needed. INSTALL ECHO Installing FOXTROT Installing ECHO INSTALL DELTA Installing DELTA LIST FOXTROT ECHO DELTA CHARLIE GOLF BRAVO ALFA REMOVE ALFA Removing ALFA REMOVE CHARLIE CHARLIE is still needed. REMOVE DELTA Removing DELTA REMOVE CHARLIE CHARLIE is still needed. INSTALL CHARLIE CHARLIE is already installed. REMOVE BRAVO BRAVO is still needed. REMOVE ECHO Removing ECHO Removing FOXTROT Removing BRAVO REMOVE BRAVO BRAVO is not installed. LIST CHARLIE GOLF END
About
short programming test - dependency manager
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published