Skip to content

Repository files navigation

DSA

Data Structures, and algorithms

How to execute problems

  1. Linux is a requirement, because of the scripts and vs code properties, but that's only for execution helpers. If you can set-up execution for your environment (Windows/Mac/etc.) then go ahead and run the .cpp files using those.
  2. Run bash setup.sh to install pre-requisites. One additional pre-requisite is installing VSCode Microsoft C++ extension to have cppdbg, this is a debugger with integration with VSCode so we can use IDE for debugging. If not using vscode or not needing IDE based debugging, feel free to avoid installing the extension.
  3. To run any problem, just run bash run.sh <cpp file path>.
  4. bash snop.sh <file problem URL> can help set up new problems (parses the URL, creates folders and then copies the template.cpp and some other small first time setups).

Problem Sources

  1. Hackerrank
  2. https://neetcode.io/practice?tab=neetcode250

Some tips

  1. Current dir ? https://stackoverflow.com/a/32024051/13036358 Useful if launching the run.sh with an absolute path, co the executable knows which directory it got called from and could create input.txt and output.txt in the dir.
  2. https://en.cppreference.com/w/cpp/language/types for built-in c++ data types

Some problem sites

  1. https://seanprashad.com/leetcode-patterns/
  2. https://neetcode.io/practice?tab=neetcode250

Leftovers

  1. In hackerrank's between 2 sets, we use LCM and GCD. Still have to learn how exactly GCD is calculated and what it is.

Problems:

  1. https://www.hackerrank.com/challenges/simple-array-sum/problem?isFullScreen=true
  2. https://www.hackerrank.com/challenges/compare-the-triplets/problem?isFullScreen=true
  3. https://www.hackerrank.com/challenges/a-very-big-sum/problem?isFullScreen=true
  4. https://www.hackerrank.com/challenges/diagonal-difference/problem?isFullScreen=true
  5. https://www.hackerrank.com/challenges/plus-minus/problem?isFullScreen=true
  6. https://www.hackerrank.com/challenges/staircase/problem?isFullScreen=true
  7. https://www.hackerrank.com/challenges/mini-max-sum/problem?isFullScreen=true
  8. https://www.hackerrank.com/challenges/birthday-cake-candles/problem?isFullScreen=true
  9. https://www.hackerrank.com/challenges/time-conversion/problem?isFullScreen=true
  10. https://www.hackerrank.com/challenges/grading/problem?isFullScreen=true
  11. https://www.hackerrank.com/challenges/apple-and-orange/problem?isFullScreen=true
  12. https://www.hackerrank.com/challenges/kangaroo/problem?isFullScreen=true
  13. https://www.hackerrank.com/challenges/between-two-sets?isFullScreen=true
  14. https://www.hackerrank.com/challenges/breaking-best-and-worst-records/problem?isFullScreen=true
  15. https://www.hackerrank.com/challenges/the-birthday-bar/problem?isFullScreen=true
  16. https://www.hackerrank.com/challenges/divisible-sum-pairs/problem?isFullScreen=true
  17. https://www.hackerrank.com/challenges/migratory-birds/problem?isFullScreen=true
  18. https://www.hackerrank.com/challenges/day-of-the-programmer/problem?isFullScreen=true
  19. https://www.hackerrank.com/challenges/bon-appetit/problem?isFullScreen=true
  20. https://www.hackerrank.com/challenges/counting-valleys?isFullScreen=true
  21. https://www.hackerrank.com/challenges/electronics-shop?isFullScreen=true
  22. https://www.hackerrank.com/challenges/cats-and-a-mouse?isFullScreen=true
  23. https://www.hackerrank.com/challenges/picking-numbers?isFullScreen=true
  24. https://www.hackerrank.com/challenges/designer-pdf-viewer?isFullScreen=true
  25. https://www.hackerrank.com/challenges/utopian-tree?isFullScreen=true
  26. https://www.hackerrank.com/challenges/circular-array-rotation?isFullScreen=true
  27. https://www.hackerrank.com/challenges/angry-professor?isFullScreen=true
  28. https://www.hackerrank.com/challenges/permutation-equation?isFullScreen=true
  29. https://www.hackerrank.com/challenges/find-digits?isFullScreen=true
  30. https://www.hackerrank.com/challenges/the-hurdle-race?isFullScreen=true
  31. https://www.hackerrank.com/challenges/cut-the-sticks?isFullScreen=true
  32. https://www.hackerrank.com/challenges/beautiful-days-at-the-movies?isFullScreen=true
  33. https://www.hackerrank.com/challenges/kaprekar-numbers?isFullScreen=true
  34. https://www.hackerrank.com/challenges/cavity-map?isFullScreen=true
  35. https://www.hackerrank.com/challenges/tutorial-intro/problem?isFullScreen=true
  36. https://www.hackerrank.com/challenges/insertionsort1/problem?isFullScreen=true
  37. https://www.hackerrank.com/challenges/insertionsort2/problem?isFullScreen=true
  38. https://www.hackerrank.com/challenges/runningtime/problem?isFullScreen=true
  39. https://www.hackerrank.com/challenges/find-the-median/problem?isFullScreen=true
  40. https://www.hackerrank.com/challenges/closest-numbers/problem?isFullScreen=true
  41. https://www.hackerrank.com/challenges/mark-and-toys/problem?isFullScreen=true
  42. https://www.hackerrank.com/challenges/sherlock-and-array/problem?isFullScreen=true
  43. https://www.hackerrank.com/challenges/jim-and-the-orders/problem?isFullScreen=true
  44. https://www.hackerrank.com/challenges/missing-numbers/problem?isFullScreen=true

About

Data Structures, and algorithms

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages