Repository navigation
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
This repo contains solutions to exercises in Introduction to algorithms, CLRS. == Some basic git concepts git keeps track of changes to files. This allows us to easily backtrack to previous "good" revisions if we've made any mistake. git also allows us to "branch" content in the sense that content in one branch is independent of another. The default branch is called "master" and new branches can be created using "git branch". == How to work with the repo o Clone the repo (which you've probably done if you are reading this offline). o Start a new topic branch. For example to add solutions to Binary search tree # git branch bst master # Creates a new branch bst from master o Checkout the newly created branch. # git checkout bst o Add solutions (Use excercise-number.tex for filenames) o Commit (do this periodically so that you can backtrack) # git commit o Format patch to merge to main tree # git format-patch master o Send patch files to baluks@gmail.com o Switch to master branch # git checkout master o Delete your experimental branch # git branch -D bst o To keep your master up-to-date # git pull origin master NOTE: - Don't do any editing while master branch is checked out. This branch should only be used to pull upstream changes. == Submitting patches After executing "git format-patch ..." there will be patch files named 0001-..patch 0002-...patch and so on. Send this to the given mail-id as attachments. == Generating solutions Once you've pulled the repository. Execute the following commands # python gen_sol.py # export TEXINPUTS=./defs/: # latex solutions.tex A solutions.dvi file will be generated which can be viewed.