Skip to content

keys-i/hackerrank-cert-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hackerrank-cert-solutions

Parent/index repository for HackerRank certification challenge repositories.

Challenge code should live in separate Git repositories and be linked here as submodules using this layout:

<topic>/<difficulty>/<module-number>

Examples:

node/basic/1
node/basic/2
node/intermediate/1
python/basic/1

Each leaf directory is a separate submodule. For example, node/basic/1 and node/basic/2 are separate repositories under the same topic/difficulty.

Clone

Clone everything at once:

git clone --recurse-submodules <parent-repo-url>

If the repository is already cloned:

git submodule update --init --recursive

Add a Module

Use the helper so the path is consistent and existing paths are not overwritten:

./scripts/add-submodule.sh node basic 3 <repo-url>

This runs:

git submodule add <repo-url> node/basic/3

Then commit the parent repo changes:

git add .gitmodules node/basic/3
git commit -m "Add node basic module 3"

Update a Module

Update one module to a newer commit:

cd node/basic/1
git pull
cd ../../..
git add node/basic/1
git commit -m "Update node basic module 1"

Update all initialized modules:

git submodule update --remote --recursive
git status --short
git add <changed-submodule-path>...
git commit -m "Update submodules"

Remove a Module

Remove the submodule from the parent repo:

git submodule deinit -f node/basic/1
git rm -f node/basic/1
rm -rf .git/modules/node/basic/1
git commit -m "Remove node basic module 1"

Existing Modules

The current node modules with local remotes are configured in .gitmodules:

node/basic/1
node/basic/2
node/intermediate/1
node/intermediate/2

For challenge folders that do not yet have external repositories, create the external repo first, then add it here with:

./scripts/add-submodule.sh <topic> <difficulty> <module-number> <repo-url>

About

Solutions and practice code for HackerRank certification challenges, organized by topic and language

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors