leetcode-solutions
My solutions to Leetcode Problems (by razimantv)
cp-algorithms
Algorithm and data structure articles for https://cp-algorithms.com (based on http://e-maxx.ru) (by cp-algorithms)
leetcode-solutions | cp-algorithms | |
---|---|---|
22 | 10 | |
61 | 6,580 | |
- | 3.6% | |
9.2 | 9.3 | |
4 days ago | 10 days ago | |
C++ | C++ | |
MIT License | Creative Commons Attribution Share Alike 4.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
leetcode-solutions
Posts with mentions or reviews of leetcode-solutions.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-10-01.
-
How can I solve this problem?
This is a 2D prefix sum problem (Check the problems tagged Prefix>Sum>2D in my repository).
-
Can anyone here explain Passing Yearbooks problem?
For more problems like this, check the Permutation> Cycle section here: https://github.com/razimantv/leetcode-solutions
-
Solved Hard#250 with today's weekly (virtually)
All my leetcode solutions are here along with tags. Find today's solutions in the latest commit.
-
Make Array Empty Biweekly Contest
You can't just use (index-displaced) because many positions in between might have already been removed. You need some data structure that can answer questions like "how many numbers in this range have not been removed?" and make updates like "remove this number" efficiently. I did this using a segment tree: https://github.com/razimantv/leetcode-solutions/tree/main/Solutions/M/make-array-empty
-
Code runs fine locally, but won't run on LeetCode
No. I used to answer a lot of programming and math questions on Quora (https://www.quora.com/profile/Raziman-T-V). I also have a GitHub repository of my LeetCode solutions (https://github.com/razimantv/leetcode-solutions)
-
Got TLE on the last problem no matter how I optimized my solution.
Here is my solution: https://github.com/razimantv/leetcode-solutions/tree/main/Solutions/D/difference-between-maximum-and-minimum-price-sum
-
Just solved Problem #1000 with today's daily
If you are interested, all my solutions (mostly C++) are here, along with tags for the algorithms/tricks I used to solve them.
-
Meeting room problem variant
Very similar to maximum profit in job scheduling. Can be done with sorting+dp with binary search: https://github.com/razimantv/leetcode-solutions/tree/main/Solutions/M/maximum-profit-in-job-scheduling
-
Can we do this question with sliding ? if yes then how?
One way to solve this would be to keep a hash map of prefix sums modulo k: https://github.com/razimantv/leetcode-solutions/tree/main/Solutions/C/continuous-subarray-sum
-
Facing wrong answer with implementation of Rabin Karp algorithm, can you help?
Here is my c++ implementation of a similar problem, try to take a look.
cp-algorithms
Posts with mentions or reviews of cp-algorithms.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-02-21.
-
Do you know of any helpful sources like this for leetcode?
I've been learning alot from this git repository: https://cp-algorithms.com/ . Do you know of any of any sources or repositories like this that help with Leetcode or problem solving?
-
Should I create an organisation from my personal account or should I create a separate GitHub user for my project?
I am aiming to create an open-source knowledge repository inspired by cp-algorithms.com . Now, I am planning this to be a long term project. This project MIGHT have different repositories, depending on how I structure the content. I am really confused between two alternatives:
-
Data Engineer @ Hedge Fund looking to go into Quant
For interviews, if you can do competitive programming well that would def make you super competitive so check out codeforces and assorted sites and compete. There’s also a competitive programming handbook on the internet and this: https://cp-algorithms.com to help
- Programozás tanítása a közoktatásban
-
AMA about my LC Journey
I did some CP and yes it opens up some new style of approaching problems with new ideas but its definitely not necessary. I would recommend the famous CSES problem set and start with codeforces . Try to give virtual div3 for starters and then jump to div2 if you feel comfortable. There is this site https://cp-algorithms.com/ which will be your best friend. Also take a look at this https://codeforces.com/blog/entry/57282 it has all the good articles on on algo/tricks/tips written by CF folks.
-
Thinking like a programmer
I can also recommend, https://cp-algorithms.com/ and the competitive programmer handbook, regardless of your intentions these resources contain mental models and algorithms that have taken computer science many years tp develop.
- Catalog of algorithms?
-
How to get better at problem solving /online judge
The best website about data structures and algorithms for CP is IMHO cp-algorithms.com. It might be overwhelming for beginners because it contains formal proofs but I found it invaluable. Be very careful with websites like geeks4geeks. I've seen many articles with bad explanations or even plain wrong information and/or implementations.
-
what resources did you use to learn DSA ?
There are a few sites I visit often such as hackerank tuitorials, geek for geek and CP-Algorithm but mostly I just learn from the top solutions in LC discussion threads.
-
i'm italian
(From https://cp-algorithms.com/graph/strongly-connected-components.html; licensed under https://github.com/e-maxx-eng/e-maxx-eng/blob/master/LICENSE)
What are some alternatives?
When comparing leetcode-solutions and cp-algorithms you can also consider the following projects:
DSA-Bootcamp-Java - This repository consists of the code samples, assignments, and notes for the Java data structures & algorithms + interview preparation bootcamp of WeMakeDevs.
competitive_programming - My solutions to programming contest problems from different sources (UVa, TopCoder, Live Archive, SPOJ, etc).