https://github.com/cruxrebels/leetcode
Collection of Abhishek Agrawal's submissions to problems found on https://leetcode.com/.
https://github.com/cruxrebels/leetcode
algorithms cpp cpp11 cpp14 data-structures leedcode-contest-solutions leetcode leetcode-contest leetcode-solutions weekly-contest
Last synced: 22 days ago
JSON representation
Collection of Abhishek Agrawal's submissions to problems found on https://leetcode.com/.
- Host: GitHub
- URL: https://github.com/cruxrebels/leetcode
- Owner: cruxrebels
- License: mit
- Created: 2019-02-03T10:16:13.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-03T19:35:29.000Z (about 6 years ago)
- Last Synced: 2025-02-15T02:16:43.770Z (3 months ago)
- Topics: algorithms, cpp, cpp11, cpp14, data-structures, leedcode-contest-solutions, leetcode, leetcode-contest, leetcode-solutions, weekly-contest
- Language: C++
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LeetCode
This repository is a collection of my gists (***working*** :white_check_mark: code snippets passing all test cases on the
[LeetCode online judge](https://leetcode.com/)) solutions in the absolutely fantastic
language, C++.Hence, the solutions won't directly execute on your local IDE or compiler, the main() would need to be written and the
solution's function would need to be invoked with appropriate inputs/test cases to run in standalone.## Notes:
- Sometimes, multiple solutions/approaches have been provided with relevant comments in the solution file,
these are being continuously updated as and when I find a more optimized solution. Be wary of copying two solutions separated
by comments simultaneously to run/submit on InterviewBit's online judge. Both shall work individually.
- I've used C++11 ([list initialization](https://en.cppreference.com/w/cpp/language/list_initialization),
[auto](https://en.cppreference.com/w/cpp/language/auto),
[emplace_back](http://www.cplusplus.com/reference/vector/vector/emplace_back/), etc) features
in each and every solution.
- The solutions also succinctly encompasses years of C++ industry programming experience and care has been taken
to optimize even at the slightest visible portions of the code.
- *The code in this repo is completely original content and written by me.* If you like what you see, don't forget to show your liking by :star:ing this repo.## How to contribute?
1. Fork the repository :fork_and_knife:
2. Do the desired changes (add/delete/modify) :pencil2:
3. Make a pull request :shipit:## When should you contribute?
- If your solution's time complexity :alarm_clock: is better than the solution already present *or*,
- If your solution's space complexity :floppy_disk: is better than the solution already present *or*,
- If your solution is of the same time *and* space complexity but is more concise :page_with_curl:.
In this case, comment out the original solution & make a pull request with your solution *or*,
- If your solution is of the same time *and* space complexity but is easier/more readable :page_facing_up: to understand *or*,
- If you use the same solution as present in the main branch and have gone the extra mile to add short comments :memo:
explaining what's happening or what's the rationale at that particular code line, wherever necessary. :pray: