Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 4.02 KB

README.md

File metadata and controls

53 lines (39 loc) · 4.02 KB

beecrowd status ctest status Documentation Status

leet

This repo contains a well documented and tested header library for data structures and algorithms, assorted standalone programs, and solutions to leetcode problems. The solutions use the header library through icanc1.

Getting started

  1. Check out the documentation;
  2. Browse the library code at include/;
  3. Browse the programs at programs/;
  4. See the tests at tests/;
  5. See the benchmarks at benchmarks/;
  6. If you have solved a problem and would like to compare your solution to mine or look for alternate solutions, see my commentary for the solutions (which includes links to the source code), or browse the source code at problems/.

Features

Header library

On the include/ directory you will find a header library with my implementations of data structures and algorithms.

Solutions

The problems/ directory has my solutions to leetcode problems, organized by judge and problem, along with testcases. On the documentation website, you can also see my commentary on each solution.

All solutions are tested with icanc1 using the testcases from the repo. When you see passing tests, it means that all solutions were accepted for the given testcases. I use the same definition of accepted as udebug2. I also test my solutions with udebug inputs using the icanc udebug integration. Those tests are not committed to the repo.

Programs

On the programs/ directory you can find the sources for standalone programs. Whenever I want to study, showcase, or document something that is not a leetcode problem, it goes here. These are varied programs that don't need their own repo, built only for learning or showcasing something.

Documentation

All library code is documented with Doxygen3, which is then turned into a Read the Docs website using sphinx4 and breathe5. The programs are documented as well.

The setup is based on this excellent guide and adapted it to my needs. If you want to browse the documentation sources, they can be found in the docs/ directory.

Tests

All library code is tested with ctest6. Non-trivial programs may be tested as well. You can find the test code in the tests/ directory.

Benchmarks

The performance charts on the documentation come from benchmarks on the benchmarks/ directory.

License

The header library is released under the MIT license and meant to be used as a learning resource. You are free to use it on your own leetcode solutions but I'd be happier (and you'd learn more) if you made your own.

You should not read the solutions before attempting to write your own, and you must not copy the solutions, entirely or in part.


powered by icanc

Footnotes

  1. https://github.com/voxelstack/icanc/ 2

  2. https://www.udebug.com/

  3. https://doxygen.nl/

  4. https://www.sphinx-doc.org/en/master/

  5. https://www.breathe-doc.org/

  6. https://cmake.org/cmake/help/latest/manual/ctest.1.html