smile_users's blog

By smile_users, history, 15 minutes ago, In English

While practicing Data Structures and Algorithms, I noticed something about my learning process.

I could solve a problem, understand its approach, get an Accepted verdict, and move on to the next one. But after a few weeks, when I revisited that problem, I sometimes struggled to recall the exact observation or approach I had used earlier.

I realized that solving more and more problems wasn't necessarily enough. Revisiting previously solved problems was equally important.

However, keeping track of which problems to revise and when to revise them manually became inconvenient.

That's when I decided to build something for myself.

Introducing LeetRepeat

I built LeetRepeat, a Chrome extension that helps me keep track of previously solved LeetCode problems and reminds me when it's time to revisit them.

LeetRepeat Chrome Extension

The extension follows a simple spaced-repetition schedule:

  • 7 days after solving a problem.
  • 30 days after solving it.
  • 90 days after solving it.

Whenever I submit a solution on LeetCode and receive an Accepted verdict, the extension tracks the problem and schedules its future revisions.

One design decision I particularly wanted to get right was preserving the original solve timestamp and revision schedule.

For example, if I solve a problem today and revisit it after seven days, submitting another Accepted solution shouldn't reset my entire revision schedule.

I wanted the revision process to remain consistent rather than constantly shifting whenever I resubmitted a solution.

How Has It Helped Me?

The biggest benefit for me has been having a structured revision routine.

Instead of relying on my memory to decide which problems I should revisit, I have a system that reminds me.

It has helped me:

  • Avoid forgetting problems I solved several weeks ago.
  • Revisit important concepts and approaches.
  • Spend time understanding previously solved problems instead of constantly chasing new problems.
  • Maintain a more organized DSA practice routine.

Building this extension also made me think more seriously about something we often overlook in competitive programming:

Learning a problem is not just about solving it once; it's about being able to derive the solution again when you encounter a similar situation.

The Question I Have for the Codeforces Community

Currently, LeetRepeat is designed for LeetCode.

But that got me thinking.

Would the same idea be useful for Codeforces?

Imagine an extension that could:

  • Track problems you have solved on Codeforces.
  • Maintain a revision schedule for previously solved problems.
  • Remind you to revisit problems after predefined intervals.
  • Help you identify problems you haven't revised in a long time.
  • Provide a dashboard to monitor your revision progress.

Of course, Codeforces has a different problem-solving environment, contests, ratings, tags, and difficulty levels. So the implementation would need to account for those differences.

I'm considering building a similar extension specifically for Codeforces, but before starting, I'd genuinely like to know whether the community would find it useful.

I'd Like to Hear Your Thoughts

A few questions:

  1. Do you regularly revisit problems you've already solved on Codeforces?
  2. Do you maintain your own revision schedule, or do you simply solve new problems?
  3. Would an automated spaced-repetition system for Codeforces problems be useful to you?
  4. If such an extension existed, what features would you want it to have?

If you're interested in the existing project, here's the LeetRepeat Chrome Web Store listing:

LeetRepeat – Chrome Web Store

I'd appreciate honest feedback, including criticism and suggestions.

If enough people find this idea useful, I'd be interested in building a Codeforces version as well.

Thanks for reading!

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it

By smile_users, history, 5 days ago, In English

As someone who spends time solving programming problems, I have always been curious about what actually happens behind the scenes when we submit our code to an online judge.

How is the code compiled? How are test cases executed? How does the system determine whether a solution is Accepted or Wrong Answer? And how are multiple submissions handled simultaneously?

I wanted to explore these questions beyond theoretical knowledge. That curiosity eventually led me to build GrowCode – A Multi-User Resource-Aware Code Execution and Management Platform.

What I Explored

While developing GrowCode, I worked on understanding and implementing different parts of a code execution workflow:

  • C++ Backend: Handling requests and managing the execution workflow.
  • Process Management: Understanding how submitted programs are compiled, executed, and terminated.
  • Worker Pool: Exploring concurrent task processing and worker management.
  • Docker: Running submitted programs in isolated execution environments.
  • MySQL: Managing users, problems, test cases, submissions, and execution results.
  • Resource Management: Exploring execution-time and resource constraints.

Concepts I Got to Explore

This project gave me an opportunity to connect different areas of Computer Science:

  • Operating Systems: Processes, threads, synchronization, and resource management.
  • DBMS: Relational database design, SQL, and relationships.
  • Backend Engineering: Request handling, job scheduling, and modular architecture.
  • System Design: Understanding how different components communicate and work together.

What I Learned

The most interesting part was realizing that a seemingly simple action like submitting code involves several components working together.

I started this project mainly out of curiosity, wanting to understand how online judges work at some level. Along the way, I got to explore concepts that I had previously studied mostly in theory and see how they come together in practice.

There is still a lot to learn and improve, but this has been a valuable hands-on experience.

GitHub Repository:
https://github.com/ashutosh691/GrowCode

I'd be happy to hear suggestions, feedback, or interesting insights from others who have explored code execution systems.

Full text and comments »

  • Vote: I like it
  • -13
  • Vote: I do not like it

By smile_users, history, 11 days ago, In English

Solved an interesting problem today on Codeforces: Call of Soldiers 3.

At first, the problem looked pretty straightforward. We had to compare Fedor's army with the armies of other players and count how many players differed in at most k types of soldiers.

Initially, I tried comparing the bits manually using bitwise AND (&) and right shifts. However, I made a small operator precedence mistake. I forgot to put parentheses around the bitwise AND operations before comparing them with !=. It was a simple mistake, but it reminded me how important operator precedence is in C++.

After thinking about it again, I realized that XOR (^) makes this problem much simpler. XOR gives 1 at positions where two numbers have different bits. So, all I needed was to count the set bits in the XOR result.

I used __builtin_popcount() to make the implementation shorter and cleaner.

Key takeaway: Sometimes, knowing the right bitwise operator can save you from writing unnecessary code. Also, a small operator precedence mistake can change the entire logic!

Another small lesson learned today. On to the next problem!

=> View my Codeforces solution — https://codeforces.me/contest/467/submission/399102777

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it