karumanchi
DS Problems from karumanchi
Latest Update
Push v0.1.15
Pathway
How do I find stuff in this repo?
- Bloom Filter
- Codechef
- Codeforces
- External Sorting
- JavaScript Algorithms
-
Karumanchi
- Chapter 1 - Introduction
- Chapter 2 - Recursion and Backtracking
- Chapter 3 - Linked Lists
- Chapter 4 - Stacks
- Chapter 5 - Queues
- Chapter 6 - Trees
- Chapter 7 - Priority Queues and Heaps
- Chapter 8 - Disjoint Sets ADT
- Chapter 10 - Sorting
- Chapter 12 - Selection Algorithms [Medians]
- Chapter 13 - Symbol Tables
- Chapter 14 - Hashing
- SPOJ
- Standard Template Library (C++)
Guide to run the C++ Algorithms
- Clone this repo
- Install MinGW on Windows and g++ on macOS & Unix-like.
- Compile and run using:
$ g++ <FILENAME.cpp> -o <OUTPUT-BINARY-NAME>
$ "OUTPUT-BINARY-NAME" # on windows cmd (using "")
$ ./OUTPUT-BINARY-NAME # on macOS and Unix-like
Adding following flags in optional and depends on the users thugh are sugegsted to be used while developing-compiling locally:
-
-g
- turn on debugging (so GDB gives more friendly output) -
-Wall
- turns on most warnings -
-O or -O2
- turn on optimizations -
-o <name>
- name of the output file -
-c
- output an object file (.o) -
-I<include path>
- specify an include directory -
-L<library path>
- specify a lib directory -
-l<library>
- link with library lib.a
However, it is suggested that you use first, second, third and fourth (while compiling source files) for best results and local development.
Guide to run the JS Algorithms
- Install Node.js
- Clone this repo
- Open the
package.json
file to find the appropriate command under scripts tag. - Run in a terminal in following fashion:
$ npm run <TAG-NAME-INSIDE-SCRIPTS>
# ex: to run stack.js in chapter 4
$ npm run stack
# OR, run directly via node
$ node js/stack.js
NOTE: Langauge formatting done automatically using VS Code IntelliSense. Better suggestions are welcome!
Directory Tree
Generated in Windows 10 using tree /F
command in cmd //C tree
terminal.
.
β .babelrc
β .editorconfig
β .eslintignore
β .eslintrc.json
β .gitignore
β .npmignore
β .travis.yml
β CMakeLists.txt
β LICENSE
β Makefile
β package-lock.json
β package.json
β README.md
β
ββββ.vscode
β compile_commands.json
β c_cpp_properties.json
β settings.json
β
ββββbloom-filter
β β readme.md
β β requirements.txt
β β setup.py
β β
β ββββbloomf
β β main.py
β β test.py
β β __init__.py
β β
β ββββdist
β bloomf-0.1-py3-none-any.whl
β bloomf-0.1.tar.gz
β bloomf-0.2-py3-none-any.whl
β bloomf-0.2.tar.gz
β
ββββcodechef
β β codechef.hpp
β β readme.md
β β
β ββββarrays
β CHN15A.cpp
β CNOTE.cpp
β COPS.cpp
β FRGTNLNG.cpp
β LECANDY.cpp
β RAINBOWA.cpp
β SALARY.cpp
β
ββββcodeforces
β readme.md
β
ββββexternal-sorting
β β kway.cpp
β β kwaymergesort.hpp
β β
β ββββgfg
β 0
β 1
β 2
β 3
β 4
β 5
β 6
β 7
β 8
β 9
β gfg.cpp
β input.txt
β output.txt
β
ββββjs
β priority-queue.js
β queue.js
β readme.md
β set.js
β stack.js
β
ββββmain
β β headers.hpp
β β
β ββββch1-introduction
β β readme.md
β β
β ββββch2-recursion-and-backtracking
β β check-sorting-recursion.cpp
β β n-ary-strings.cpp
β β readme.md
β β tower-of-hanoi.cpp
β β
β ββββch3-linked-lists
β β cycle.cpp
β β fractional-node.cpp
β β merge.cpp
β β nth-element-from-end.cpp
β β pairwise-reverse.cpp
β β palindrome.cpp
β β readme.md
β β reverse-kth.cpp
β β reverse-sll.cpp
β β sort.cpp
β β split-cll.cpp
β β
β ββββch4-stacks
β β adjacentBigger.cpp
β β adjacentRepeat.cpp
β β growth.cpp
β β infix-to-postfix.cpp
β β postfix.cpp
β β readme.md
β β reverse.cpp
β β span.cpp
β β stack.cpp
β β symbol-parser.cpp
β β
β ββββch5-queues
β β linked-list-queue.cpp
β β readme.md
β β simple-queue.cpp
β β
β ββββch6-trees
β β array2bst.cpp
β β bst2dll.cpp
β β check-bst.cpp
β β count-tree.cpp
β β dll2bst.cpp
β β expression-tree.cpp
β β find-max.cpp
β β inorder-sucessor.cpp
β β kth-smallest.cpp
β β preorder-sucessor.cpp
β β ranger.cpp
β β readme.md
β β readme.txt
β β reverse-lca.cpp
β β threaded-tree.cpp
β β threaded-tree.txt
β β
β ββββch7-priority-queues
β β fimd-max-in-min-heap.cpp
β β find-k.cpp
β β heap-sort.cpp
β β heap.hpp
β β median.cpp
β β pq.hpp
β β readme.md
β β stack.cpp
β β
β ββββch8-disjoint-sets
β β adt.hpp
β β cities.cpp
β β readme.md
β β
β ββββch10-sorting
β β bucket.cpp
β β check-repeat.cpp
β β counting.cpp
β β election.cpp
β β flagged-bubble.cpp
β β insertion.cpp
β β max.cpp
β β merge.cpp
β β mergeAB.cpp
β β quick.cpp
β β readme.md
β β shell.cpp
β β sort.hpp
β β
β ββββch12-selection-algorithms
β β kth-smallest-2.cpp
β β kth-smallest.cpp
β β merge.cpp
β β readme.md
β β
β ββββch13-symbol-tables
β β readme.md
β β
β ββββch14-hashing
β β array-matching.cpp
β β delete-array.cpp
β β find-pairs.cpp
β β first-non-repeat.cpp
β β first-repeat.cpp
β β hash-pairs.cpp
β β readme.md
β β remove-duplicates.cpp
β β seperate-chaining.hpp
β β two-arrays.cpp
β β
β ββββincludes
β cll.hpp
β dll.hpp
β queue.hpp
β sll.hpp
β stack.hpp
β tree.hpp
β
ββββmisc
β sparse-set.cpp
β sparse-set.hpp
β
ββββspoj
β readme.md
β
ββββsrc
β commit.js
β deploy.js
β index.js
β push.js
β
ββββstl
β stl.hpp
β
ββββtest
index.js
License
Β© 2018 Sambhav Jain under GPL-v3.0