You can use several words in query to find by all of them at the same time. In addition, if you are lucky search understands word forms and some synonyms. It supports search by title and author. Examples:

  • 305 — search for 305, most probably it will find blogs about the Round 305
  • andrew stankevich contests — search for words "andrew", "stankevich" and "contests" at the same time
  • user:mikemirzayanov title:testlib — search containing "testlib" in title by MikeMirzayanov
  • "vk cup" — use quotes to find phrase as is
  • title:educational — search in title

Results

1.

leetcode

Last visit:  8 years ago
Registered:  8 years ago
2.
By cjj490168650, history, 4 years ago, In English
[Repost] "Justice may be delayed, but it cannot be absent": New Evidence on NXIST's Cheating Scandal _Original post: [「正义可以迟来但不能缺席」:关于 NXIST 的一些新证据](https://zhuanlan.zhihu.com/p/620297880)_ _Translated by GPT-4 with some adjustment. Please inform me if there are any mistakes._ _All links to the invalid repository have been redirected to the backup repository._ **This article provides a logically complete set of evidence, which does not involve any non-public internet resources, regarding the "suspected cheating" incident involving the ICPC Yinchuan Station and ICPC Shenyang Station in 2021. By discovering the suspected GitHub account ([NaokiLH](https://github.com/NaokiLH), renamed to https://github.com/brokenTarget) of a team member from Ningxia Institute of Science and Technology (NXIST) TS 1 team, Lan Hao, two years ago, and by mining and analyzing the commit records of his algorithm competition repo, we have obtained direct evidence that at least 4 questions from the 2021 Yinchuan regional contest set and at least 6 questions (including scrapped questions) from the 2021 Sh...
participated in LeetCode training. This concludes the main evidence presentation in this article., study LeetCode and regularly checked in with AcWing. Until the Shenyang Regional Contest offline, After June 11, NaokiLH continued to study LeetCode and regularly checked in with AcWing. Until the

Full text and comments »

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

3.
By Zhtluo, history, 3 years ago, In English
The Reason You are Bad at Codeforces — You are Not Russian Enough If you are triggered by this clickbaity blog title, you are probably interested in improving your Codeforces skills. Now, I will share my point of view on the differences between Codeforces and ICPC contests, and how you can, in my humble opinion, maximize your Codeforces rating gain. I mostly consider that all conceivable competitive programming problems need three aspects of skill: 1. Observation — the ability to understand the problem and come up with non-trivial properties. 2. Technique — the ability to apply a well-known algorithm or data structure to the problem. 3. Implementation — the ability to code fast and debug fast. Collaterally, I refer to these three skills as Russian-ness, Chinese-ness and American-ness, respectively, for reasons you will soon see below. ## Observation (Russian-ness) Observation means that you stare at some problem for a sufficient amount of time and you are able to reduce it to some easier problem. One good proble...
Codeforces now, you only need Leetcode medium + high school math contest to get to blue. I will try, now, you only need Leetcode medium + high school math contest to get to blue. I will try to argue for

Full text and comments »

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

4.
By hxu10, history, 4 years ago, In English
It's time to say goodbye, but not fairwell, to codeforces Hello everyone. I am a codeforcer for two and half years. I took part more than 130 contests, write hundreds of comments and blogs. Now it's time to say goodbye, but not fairwell, to contests. My English is not very good, but my words are sincere. As a Physics PhD new grad try to become a sofeware engineer, I took part in my first codeforces contest in 2020. My initial reason for the codeforces, is to practice algorithm, since I found it difficult to solve the hard tag problem in leetcode weekly contest, and a experience leetcoder told me: "if you want to solve harder problem in leetcode, try codeforces, and if you can solve 2400 rating problem in codeforces, leetcode problem is just piece of cake. " So I took part my first contest: educational codeforces 97. The results was very good, I solved four problems and get a ranking of 600+. However, my second contest is a disaster and give me huge lesson. I found it difficult even for reaching blue. I keep practicing, foc...
difficult to solve the hard tag problem in leetcode weekly contest, and a experience leetcoder told me, Thanks to codeforces, I also have much greater performance in leetcode contest. I reach top 20, leetcode in nights. However this is still not enough, I am still unemployed, and my money deposit is, leetcode weekly contest, and a experience leetcoder told me: "if you want to solve harder problem in

Full text and comments »

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

5.
By Geothermal, history, 3 years ago, In English
A Highly Experimental Training Plan for Beginners Very loosely inspired by some comments on [Thoughts on Reaching Cyan?](https://codeforces.me/blog/entry/101561) and [my recent AMA](https://codeforces.me/blog/entry/118845). Until now, I've avoided telling beginners to practice math before working on competitive programing problems because I haven't figured out a helpful way of doing so. This post is my attempt at telling grays to train math first in a way that might lead to improvement without an absurd time commitment. ## Introduction This section is largely motivation for why I'm proposing this training plan. If you just want to see the instructions for the training plan I'm proposing, you can skip this part. The first subsection in particular is not especially relevant to the rest of the post, but I wanted to have some documentation explaining why I still think the traditional "just solve problems" advice is good. ### The Conventional Advice on Improvement I'm frequently asked for advice on how to improve at co...
interviews because technical interview/LeetCode problems don't heavily emphasize mathematical problem

Full text and comments »

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

6.
By catgirl, 12 months ago, In English
I have solved problems on Codeforces for 500 days in a row It's been a while since I started my journey into competitive programming and in this year and (almost) a half I would say that I learned a bit not only about problem solving but also about myself, so I wanted to share my reflections on some mental aspects of practicing competitive programming hoping they can help someone else. Please note that these reflections are merely personal and mostly stem from personal experience, if you disagree with something I would like to know your point of view! I would also like to thank [user:Intellegent,2025-12-08], [user:turska,2025-12-08] and [user:LMeyling,2025-12-08] for proofreading. ![ ](/predownloaded/07/0b/070b72002cfad69b15bb24a5a086d9b8466bcb96.png) #### Some background I used to do math olympiads for 8 years before starting university, in hindsight I did not really like it that much since I never practiced on my own and would've rather played League of Legends / Minecraft / VALORANT or whatever game I was obsessed at the time. ...
motivation I had was that I wanted to get good at coding so I could get a job, basically grindingLeetcode, , basically grinding Leetcode, but Leetcode kinda felt like a dead end so Codeforces being more

Full text and comments »

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

7.
By Errichto, 17 months ago, In English
DP Group Class in August 2025 _The blog publish date is incorrect, should be around 12.07.2025. CF saved the draft date._ Hi, I'm organizing paid group classes on Dynamic Programming in August. Last year, I did something similar with general problem-solving ([link](https://codeforces.me/blog/entry/129878)). There will be two groups of different style and difficulty. Each group gets 8 lessons of 1h30m each, from 28.07.2025 to 24-31.08.2025. Group size up to 12 people. You get access to recordings and problems from both groups, but you should actively attend only one. There's a lot of homework, some to be discussed next lesson. I will create new original CF/Polygon problems, especially for the easy group. These problems will eventually be published for everybody! **Price**: 250 EUR with a small country-based discount. **Registration**: You should pay via [link (Stripe)](https://buy.stripe.com/7sY3cx2nD5Oh8CQ7w96wE03) and choose the group there. I will send you the Discord invite link via e-mail. Co...
recent LeetCode Weekly contest. 150 EUR / month. Registration soon., #### LeetCode classes

Full text and comments »

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

8.
By babbaranuj_exposed, history, 5 years ago, In English
LOVE BABBAR and ANUJ BHAIYA Exposed!!! Lets first give the introduction of these two **DUMBOS**. **BABBAR:** Runs a YouTube channel having 300K+ subscribers **ANUJ BHAIYA:** Runs a YouTube channel having 170k+ subs. **Who am I?** _Ans_: I am also among one of the YouTubers who belong to the company Amazon. **Why am I writing this post?** _Ans_: I am wanting to clear the misconception that they have spread about the company, and how they are misusing there wrong doings to wrongly influence people to do wrong tasks. **Background**: Recently Babbar posted that he will be resigning Amazon. Next Anuj posts that Amazon asked him to choose YouTube or Amazon, and he makes a video that he left Amazon for students. The moment Anuj released the video, Babbar felt he will loose out on fame, so within an hour, he posted on Linkedin that he also stood with 3L students over Amazon. The screenshots of these things are below.. ![ ](/predownloaded/de/c1/dec138c0c389f91e980b081fdb4a03a96a1c17ab.png) ![ ]...
- Babbar recorded couple of videos, one was solving leetcode during office hours, and one more was

Full text and comments »

9.
By Wind_Eagle, history, 5 years ago, translation, In English
Как тренироваться: почему недостаточно просто решать много задач Привет, Codeforces! Я, как и многие из вас, периодически читаю блоги. В последнее время мое внимание стали привлекать блоги от пользователей с низким рейтингом, которые спрашивают, как им поднять свой рейтинг. Хочу немного рассказать о своем мнении по поводу этих блогов. Итак, что же их себя представляют эти блоги? Обычно это блог с заголовком что-то вроде <b>"Срочно нужна помощь!"</b> или <b>"Как улучшить рейтинг, помогите!"</b> Когда открываешь этот блог, то видишь максимально подробное описание проблемы, например, такое: "я решил уже 500 задач, а улучшения все нет и нет." или "я решил уже 100 задач с рейтингом >= 1500, а мой рейтинг не увеличивается". А в комментариях им обычно пишут "ты недостаточно решал, решай больше" ну или "решай более сложные задачи". <b>На мой взгляд, это неверно, и вводит таких пользователей в заблуждение.</b> Позвольте объяснить, что я имею в виду. Итак, представьте, что вы вообще ничего не знаете ни о спортивном программировнии, ни даже об основах ол...
at all. That's what LeetCode was invented for — there's a bunch of great problems to prepare, место для такого. Для этого придумали LeetCode — там есть куча прекрасных задач для подготовки

Full text and comments »

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

10.
By Errichto, 8 years ago, In English
And three streams this week Hi. Even more streams are coming. For notifications, subscribe to my secondary channel for streams [Errichto 2](https://www.youtube.com/errichto2), or you can watch me on [Twitch](https://www.twitch.tv/errichto). **Stream 1** &mdash; Monday [at 12:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20190520T12&p1=262), I want to check out coding interview platforms like Leetcode. Here's [Youtube link](https://www.youtube.com/watch?v=1PhErzqrY6c). **Stream 2** &mdash; Tuesday [at 9:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20190521T09&p1=262). Algo research and writing old editorials. Links to [part 1](https://www.youtube.com/watch?v=XWf9DCMnpFM) and [part 2](https://www.youtube.com/watch?v=5rW-t3KFLM0) (the stream stopped for a few seconds and the new one started). **Stream 3** &mdash; Friday [at 12:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20190524T12&p1=262). Solving Codeforces problems, mainly around <s>div...
?iso=20190520T12&p1=262), I want to check out coding interview platforms like Leetcode. Here's, Leetcode. Here's [Youtube link](https://www.youtube.com/watch?v=1PhErzqrY6c). **Stream 2** &mdash

Full text and comments »

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

11.
By Anshul_Johri, 3 years ago, In English
C++ Debug Template! # C++ Debug Template &#x1F6E0; **Simplify variable tracking across functions and loops!** **Note:** For latest updates and a colored stderr version of this template, visit my [Github](https://github.com/Anshul-Johri-1/Debug-Template). <spoiler summary="Longer Template (std >= C++11)"> ```c++ #ifndef DEBUG_TEMPLATE_CPP #define DEBUG_TEMPLATE_CPP #include <bits/stdc++.h> // #define cerr cout namespace __DEBUG_UTIL__ { using namespace std; /* Primitive Datatypes Print */ void print(const char *x) { cerr << x; } void print(bool x) { cerr << (x ? "T" : "F"); } void print(char x) { cerr << '\'' << x << '\''; } void print(signed short int x) { cerr << x; } void print(unsigned short int x) { cerr << x; } void print(signed int x) { cerr << x; } void print(unsigned int x) { cerr << x; } void print(signed long int x) { cerr << x; } void print(unsigned long int x) { cerr << x; } void print(signed long long int x) { cerr...
- When using it for LeetCode uncomment `#define cerr cout` and before submitting change `#ifndef, LeetCode, paste this above `class Solution` and use debug normally. 4. Before submitting, change, Now for LeetCode

Full text and comments »

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

12.
By Agnimandur, 5 years ago, In English
1 on 1 Competitive Programming Coaching Hello Codeforces! #### Coaching I am a USACO Platinum contestant, former Codeforces International Master rated 2377, Leetcode 2600, member of the [Binarysearch.com](http://binarysearch.com) contest team, and author of [contest:1548] and [contest:1549]. I'm offering **one on one** competitive programming lessons OR leetcode practice, online over Zoom. - I can help you get better at [USACO](http://usaco.org). - I can help you gain Codeforces rating. - I can help you with [Leetcode.com](http://leetcode.com) and [Binarysearch.com](http://binarysearch.com) problems. I can help explain common interview programming techniques. #### Price The price is **$50 an hour** due to exceptionally high demand. #### Interest If you're interested, please send a direct message to [user:Agnimandur,2021-08-12] over Codeforces! Alternatively, send a direct message over [Discord](http://discord.com) to **Agnimandur#9256**. #### Frequently Asked Questions Suggest more questions in the com...
International Master rated 2377, Leetcode 2600, member of the [Binarysearch.com](http://binarysearch.com, , Leetcode 2600, member of the [Binarysearch.com](http://binarysearch.com) contest team, and author

Full text and comments »

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

13.
By 18o3, history, 4 years ago, In English
Leetcode Administration said I'm cheating **Update:The issue has now been rectified and I have got back my coins and rank. Thanks for the support everyone.**<br> Since Leetcode has banned me for a month from posting on their website, I'll try to explain my situation here. Recently I participated in Leetcode Biweekly 98 and got rank 1(personal milestone).However today morning without any prior communication all my leetcoins were deducted and my name was removed from the leaderboard as I have violated contest rules. (I have not.) [cut] <br><br> As given on the contest page,<br> " Below actions are deemed contest violations:<br> One user submitting with multiple accounts during a contest. LCUS (leetcode.com) account and LCCN (leetcode-cn.com) account are considered to be separate accounts, even if both accounts belong to the same user.<br> Multiple accounts submitting similar code for the same problem. <br> Creating unwanted disturbances which interrupt other users' participation in a contest. <br> Disclosing contest...
Leetcode Administration said I'm cheating, available [here](https://codeforces.me/contest/877/submission/194015046). There is noleetcode rule about, submitting with multiple accounts during a contest. LCUS (leetcode.com) account and LCCN (leetcode, support everyone.** Since Leetcode has banned me for a month from posting on their website, I'll, Recently I participated in Leetcode Biweekly 98 and got rank 1(personal milestone).However today

Full text and comments »

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

14.
By nika-skybytska, 5 years ago, In English
March Summary ## Ratings _It's always nice to see them growing._ - codeforces: 2311 + 21 = 2332 - atcoder: 2024 + 29 = 2053 - leetcode: 2701 + 81 = 2782 - dmoj: 2161 + 197 = 2358 - prepbytes: 1853 + 79 = 1932 ## Contests _A contest a day keeps mental health away._ - rated: 11 - unrated: 14 - fullsolve: 12 ## Problems _One downside of many contests is that you don't have time to upsolve properly._ - solved: 145 - upsolved: 5 - todo: 23 **Hardest problems that I solved in-contest:** - [CF #779 E &mdash; Gojou and Matrix Game](https://codeforces.me/problemset/problem/1658/E) - [ABC 245 G &mdash; Foreign Friends](https://atcoder.jp/contests/abc245/tasks/abc245_g) - [CC Start 32 &mdash; Avoid Alternating](https://www.codechef.com/problems/AVOIDALT) - [PB PT P5 &mdash; Kevin and his Operation](https://mycode.prepbytes.com/problems/bit-manipulation/KVOP) **Easiest problems that I failed to solve in-contest:** - [ARC 137 C &mdash; Distinct Numbers](https://atc...
- codeforces: 2311 + 21 = 2332 - atcoder: 2024 + 29 = 2053 - leetcode: 2701 + 81 = 2782 - dmoj, : 2024 + 29 = 2053 - leetcode: 2701 + 81 = 2782 - dmoj: 2161 + 197 = 2358 - prepbytes: 1853 + 79

Full text and comments »

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

15.
By Errichto, 3 years ago, In English
Group tutoring Hi. I offer classes for groups of 2-3 students. I teach competitive programming with a focus on problem-solving. There won't be many lectures because I can send you an article/video link instead. The lesson cycle is usually: I choose a problem, you say your thoughts and ideas, I comment on incorrect ideas, and we talk about the valid solution(s), possibly with drawings and pseudocode. In beginner groups, I might ask you to implement something, C++ or Python preferred. There's a lot of homework and you're expected to practice a few hours per week. We might spend half a lesson talking about 1-2 homework problems from last week. This is intended. We use Google Meet, shared whiteboard, and a collaborative editor Codebunk. After a lesson, you get a video recording and a codebunk with code/text history like this one https://codebunk.com/pb/3501100331621/. This allows you to copy links and code easily. There's a Discord group chat to ask questions between classes. - 1.5h les...
Leetcode problems and authored some for Hackerrank and Codility. A few years ago, I was going to

Full text and comments »

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

16.
By snowysecret, history, 6 years ago, In English
Survey on Competitive Programming Hello! I would like to conduct a survey about competitive programming in general, including when you started, how you practice and more. There are ten questions, and it should not take more than three minutes to finish it. You can click [this link](https://docs.google.com/forms/d/e/1FAIpQLSeBHPIyQZrG7a3NZfwXNpdvjNerE31Fs9l9AXJ6t94PMhB-8g/viewform?usp=sf_link) to complete the survey. Thanks for helping! **Update 1:** One of the questions, "How confident are you on being a red coder?" now allows decimals (from 1.0 to 5.0) as responses! Also you can submit more than once now. **Update 2:** A new question is added: "Which category do you belong to on Codeforces?" (sorry for not adding it previously) **Update 3:** The survey will be accepting responses until [Thursday, October 22, 2020 at 00:55 (UTC)](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Deadline+of+Survey+Responses&iso=20201022T0055). Results will be out in a few days. **Update 4:** The survey is n...
LeetCode: 27.4%

Full text and comments »

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

17.
By EbTech, 7 years ago, In English
How to Interpret Contest Ratings **UPDATE: the [new rating system paper](https://arxiv.org/abs/2101.00400) will appear in the Web Conference 2021!** If you're new to competitive programming, you may be wondering: what are ratings and colors? What do they mean? As a contestant and now coach of the UBC team, I've taken enough interest in the subject to have developed my own rating system, Elo-MMR, which I might describe in a future blog post. For now, I want to talk about ratings more generally: what does it mean to achieve a certain rating or title? How concerned should you be with your rating and title? Might it be harmful to be concerned with them at all? A Brief History of Contest Ratings -------------------------------------- Contest rating systems can trace their heritage back to the [Elo system](https://en.wikipedia.org/wiki/Elo_rating_system). Elo was devised for 2-player games, with rating updates based on whether a player wins, loses or draws. Starting in 1960, it was adopted by the chess community ...
You might start with sites such as [LeetCode ](https://leetcode.com/problemset/algorithms/) which

Full text and comments »

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

18.
By Arpa, history, 3 years ago, In English
Algoritmi Competitive Programming Academy Hello Codeforces Community, I am _AmirReza PourAkhavan_, - Over **8** years of teaching experience, including teaching at the Iran Team Selection Camp for **IOI**. - Contest coordinator at LeetCode and formerly, **Codeforces**. - ICPC World Finalist (twice) and took a high-honored place, **24**. - Solved over **5000** problems on various platforms. Along with my dedicated team, I am thrilled to introduce our new project focused on developing the next generation of competitive programmers. Having competed in and coached teams for the Iranian and International Olympiads in Informatics, we have experienced firsthand the significant impact of competitive programming. It is with great enthusiasm that we are launching an affordable, high-quality training program to prepare ambitious individuals for the challenges and opportunities of **IOI** and other competitive programming contests, like **ICPC**. <center> <br> <img width="30%" src="/predownloaded/b6/f5/b6f5012e2a5f7ce09...
**IOI**. - Contest coordinator at LeetCode and formerly, **Codeforces**. - ICPC World Finalist

Full text and comments »

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

19.
By mosambijuice, 16 months ago, In English
Leetcode Stress Tester Excited to share my project. LeetCode Stress Tester – a VS Code extension that brings powerful, no-code stress testing to competitive programmers! This extension lets you fetch LeetCode problems, auto-pull brute-force solutions, generate random tests, and compare outputs seamlessly in your editor. Debug edge cases without the hassle of manual setups. Why This Tool? Stress testing is essential for catching hidden bugs in optimized solutions. This extension automates it for C++, using your code against a reliable baseline. No need to write brute-force logic – it fetches official LeetCode or [GitHub solutions]() for brute.cpp! Key Features:- No-Code Brute Integration: Automatically source brute-force code from official solutions or GitHub repos, so you focus on your solution.cpp. Smart Test Generation: Customize gen.cpp with minimal effort using the generative.h header. Functions include: generate_number(l, r): Random int in [l, r]. generate_array(l, r, n): Array of size n ...
Leetcode Stress Tester, Stress Tests" – results appear in a dedicated panel. Perfect for LeetCode and CP enthusiasts looking, -force logic – it fetches official LeetCode or [GitHub solutions]() for brute.cpp!, Excited to share my project. LeetCode Stress Tester – a VS Code extension that brings powerful, no, GitHub: LeetCode Stress Tester https://lnkd.in/gu_bBaWE, Workflow Here's a quick step-by-step on how it works: Fetch Problem: Pull a LeetCode problem into

Full text and comments »

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

20.
By Errichto, 7 years ago, In English
AtCoder & LeetCode & Codeforces streams in February '20 I'm back to streaming and I plan the following three problem-solving streams, each lasting around 5 hours: - [At 8am CET on Thursday, February 6](https://www.timeanddate.com/worldclock/fixedtime.html?msg=atcoder+easy&iso=20200206T08&p1=262&ah=5) AtCoder easy problems (ABC), including the most recent [ABC 153](https://atcoder.jp/contests/abc153). - [At 8am CET on Monday, February 10](https://www.timeanddate.com/worldclock/fixedtime.html?msg=atcoder+difficult&iso=20200210T08&p1=262&ah=5) AtCoder hard problems (AGC), including the most recent [AGC 41](https://atcoder.jp/contests/agc041) by tourist. - [At 8am CET on Thursday, February 13](https://www.timeanddate.com/worldclock/fixedtime.html?msg=leetcode&iso=20200213T08&p1=262&ah=5) LeetCode recent problems. I will think out loud and talk about solutions, sometimes with implementation too. Streams 1 and 3 are meant to be educational, while stream 2 will be more of me thinking and struggling. I will not do virtual participation beca...
AtCoder & LeetCode & Codeforces streams in February '20, /fixedtime.html?msg=leetcode&iso=20200213T08&p1=262&ah=5) LeetCode recent problems. I will think out loud and, =leetcode&iso=20200213T08&p1=262&ah=5) LeetCode recent problems.

Full text and comments »

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

21.
By fatalerror, history, 16 months ago, In English
Python Optimization Tricks in Competitive Programming > For better reading experience in Chinese, please refer to: [LeetCode](https://leetcode.cn/discuss/post/3746464). # Preface This article introduces techniques to reduce runtime in competitive programming using Python, under the premise that the complexity remains **correct** and **unchanged**. Each technique is accompanied by a Speedup on CPython 3.11.5 / PyPy 3.10.13. # I/O ### Use fast input Replace the built-in `input` with `sys.stdin.readline`. Each `input()` call incurs prompt handling and a `sys.stdin` lookup, while `readline()` reads a line directly. The more input lines, the larger the gap. Speedup: CPython ~×4.2; PyPy ~×16.4. ~~~~~ import sys input = lambda: sys.stdin.readline().rstrip() # strip the trailing newline II = lambda: int(input()) LII = lambda: list(map(int, input().split())) ~~~~~ ### Read all input at once Use `sys.stdin.read().split()` to read everything into memory once, then consume as needed. This avoids calling the read fun...
> For better reading experience in Chinese, please refer to: [LeetCode ](https://leetcode.cn/discuss

Full text and comments »

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

22.
By muhammadhasan01, 2 years ago, In English
Invariant List | Share Your Invariant Here! [Invariant](https://brilliant.org/wiki/invariant-principle-definition) is a property that remains unchanged after operations/transformation, we see this a lot in competitive programming, especially with operations involved. <spoiler summary="Simple Example"> Given an array $a$ of $n$ integers with $n \geq 2$, in one operation you can choose two different indices $i$ and $j$ $(1 \leq i, j \leq n)$ and increment $a_i$ with $1$ and decrement $a_j$ with $1$. Given another array $b$ of $n$ integers, is it possible to change $a$ to $b$ with some operations? It is easy to see that the invariant for this problem is that: The sum of all the integers in $a$ will remain unchanged. With that information, we can further prove that it is possible to change $a$ to $b$ if the sum of integers in $a$ is equal to the sum of integers in $b$. </spoiler> I wanted to make an "Invariant List" here so the community could benefit from it, if you have some invariants in mind share with us ...
Similar Problem: [LeetCode Biweekly 125 — Q4](https://leetcode.com/accounts/login/?next

Full text and comments »

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

23.
By kartik8800, history, 6 years ago, In English
Dynamic Programming on Trees Hello Codeforces!! In this blog, I want to present to you a beginner-friendly video lecture series on dynamic programming on trees/an editorial for the CSES tree algorithms section. [CSES](https://cses.fi/problemset/) is a brilliant problemset for people wanting to get started at competitive programming and get good at it. My aim till now has been to make the explanations intuitive, crisp and clear. I feel even a beginner will be able to benefit from these video lectures. So let's get started.<br>[Link to the problems](https://cses.fi/problemset/)<br> Subordinates ------------ Explanation : [https://youtu.be/fGznXJ-LTbI](https://youtu.be/fGznXJ-LTbI)<br> AC code : https://github.com/kartik8800/CSES/blob/master/Subordinates Tree Matching ------------ Somehow I feel some other nice approaches are also possible, please do share.<br> Explanation : [https://youtu.be/RuNAYVTn9qM](https://youtu.be/RuNAYVTn9qM)<br> AC code : https://github.com/kartik8800/CSES/blob/...
>: added solution to binary tree cameras from leetcode., Binary Tree Cameras Leetcode ------------ problem statement: [https://leetcode.com/problems

Full text and comments »

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

24.
By galen_colin, 3 years ago, In English
THE OPTIMAL PRACTICE STRATEGY (**NOT CLICKBAIT**) Spoiler: it's clickbait. Sorry. Titles like those are fun. ...but, it's the same style of clickbait as my [roadmap](https://www.youtube.com/watch?v=bSdp2WeyuJY) [spoiler 2: if you haven't seen that, it markets itself as a standard roadmap (y'know, soulless and devoid of purpose), but then a few minutes in, says "ok but roadmaps are stupid and here's the advice that you really need" and completely changes the direction of the video]. That's my style of clickbait, and that's the vibe this blog goes for. [cut] <br><br> So... hear me out, please. The start ------------------ First, a couple meta-notes. I will likely exaggerate my tone a bit here for dramatic effect. Don't take it personally, please. Also, **this applies to almost all ratings**. At the very least, I recommend you process the main point of this blog and see whether or not you already do something similar (for most people... probably not?) The problem ------------------ I'm sure if you've looked at the...
-solving wrong? What if you try to solve everything like a school problem (or LeetCode), just throwing

Full text and comments »

Tags hi
  • Vote: I like it
  • +207
  • Vote: I do not like it

25.
By lnishan, 11 years ago, In English
An awesome list for competitive programming! This is a project I started from late January 2016. My motive is that: Although there's fantastic information out there, I think they're still spread all over the place. Therefore, in my opinion it would probably be cool if there's an [awesome list](https://github.com/sindresorhus/awesome) for competitive programming! ( *It's now featured on the main list!* ) I'm actively updating the list here: [https://github.com/lnishan/awesome-competitive-programming](https://github.com/lnishan/awesome-competitive-programming) # Awesome Competitive Programming [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) A curated list of awesome `Competitive Programming`, `Algorithm` and `Data Structure` resources. Created with a view to connecting people to information, this list below contains a complete collection of all the fantastic resources I've collected over the course of my 11...
problem tutorials of HackerRank, LeetCode, Topcoder and Codeforces. | | "Sothe" the Algorithm Wolf

Full text and comments »

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

26.
By adamant, 5 months ago, In English
OCPC 2026 Summer Hi everyone! <center><a href="https://ocpc.camp"><img src="https://ocpc.camp/images/ocpc_light.svg?nocache" height="80px"></a> <a href="https://icpc.foundation/"><img src="https://ocpc.camp/images/ICPC.svg?nocache" height="80px"></a></center> The [OCPC](https://ocpc.camp/) (Osijek Competitive Programming Camp), an [award-winning](https://www.linkedin.com/feed/update/urn:li:activity:7368330111089131522/) camp for university students preparing for ICPC and other coding competitions, is back this **Summer 2026** — this time with **two onsite editions**: - **Hong Kong** — **8–16 August 2026**, hosted at the City University of Hong Kong. - **Iași, Romania** — **12–20 September 2026**, hosted at Alexandru Ioan Cuza University of Iași. Both editions are organized by us together with local hosts at each site, and use the **same contest set** — so you take part in **one** of them. As a rough guide, the **Iași** edition is most convenient for teams based in Europe, and **Hong Kong*...
,2026-06-20] — a competitive programming enthusiast and rank 3 on LeetCode globally. - [user:AmShZ

Full text and comments »

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

27.
By truthforces, 20 months ago, In English
Cheaters are now becoming Core Members of University Coding Clubs (I am sorry for bringing up this blog more frequently in recent actions, but I'm doing it so that my seniors notice it and can take strict action against him once they see it) Hello Codeforces, Let me introduce you to [**Soumyadeep Singh**](https://www.linkedin.com/in/soumyadeep-singh-347044258) , who has successfully cheated his way through Codeforces and LeetCode contests, Online Assessments, university examinations, and now we can also see him as an official problem setter in coding contests organized by Jadavpur University's coding clubs. ![ ](/predownloaded/ed/6d/ed6d51b9168cc84d5b14fdd4bb507c780a349e81.png) [user:singhsoumya_coder,2025-04-14] is a pre-final year student at Jadavpur University, and he is well-known for his massive cheating scandals and for his consistent track record in cheating. He cheated his way to **Google** during campus internships, and people also found his behavior suspicious when he used to write outrageous messages in AskSenior and other cod...
solutions to increase solve count, cheating in leetcode, cheating in OA's, cheating in university, -347044258) , who has successfully cheated his way through Codeforces and LeetCode contests, Online, Have a look at his recent shitty copy pasted ChatGPT submission on leetcode which he does everyday, Successfully copy pasted 1500 cheated submissions on Leetcode! I think leetcode database might even

Full text and comments »

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

28.
By nika-skybytska, history, 5 years ago, In English
Data Structures in Dynamic Programming Week [![thumbnail](/predownloaded/74/3c/743c38e2e9b8f1cfeacd9ab44f5cce581dc2d0ed.png)](https://youtu.be/Aaceu-Z0abc) (click on the thumbnail to watch a YouTube video) Welcome back to what I called "ds in dp week", and you'll see in a second what this is all about. But first I wanted to share some stats with you: ### Contests This week I took part in 7 contests. Four of them are rated for me, and in the remaining three, I participated unofficially. I took second place in the Hacker Earth's Easy competition, got on the first standings page of LeetCode Biweekly Contest 69, and had my best TopCoder performance so far, which saw 164 points rating increase. Codeforces' Hello 2022 didn't go so well, with me managing to solve only A-D. Luckily I only got -15, a surprisingly forgiving rating change for an underperformance. The remaining three competitions were unrated for me, so I didn't pay much attention to them. It partially explains my questionable results on CodeChef Start...
refreshing walk in-between but still was too tired to wake up at 4:30 a.m. on Sunday forLeetCode Weekly, LeetCode Biweekly Contest 69, and had my best TopCoder performance so far, which saw 164 points rating

Full text and comments »

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

29.
By bihariforces, history, 16 months ago, In English
A WhatsApp Bot for Codeforces Analytics, Visualizations, and More Hello Codeforces community, ------------------ I wanted to share a useful WhatsApp-based AI assistant that might help with our competitive programming workflows. The idea is to bring essential tools directly into your chat, saving the time you'd spend switching between different websites. One of the most interesting features is its ability to generate a "true performance" graph for any user, which visualizes your performance rating in every contest. How to Use ------------------ Click the link to open a chat: [Whatsapp Chat Link](https://puch.ai/mcp/ycGISc7uVo) Send the pre-filled message that appears. The bot will then be active and you can start sending commands. Available Tools ------------------ Here is a list of its few functionalities. You can ask for them in natural language (e.g., "plot my rating graph" or "recommend a problem for me"). ###Analytics & Information `get_codeforces_user_stats`: Fetches detailed stats for one or more users. `recommend_problems`:...
You can even ask for upcoming contests schedules, Leetcode Daily Challenge problem or some tips for, `get_upcoming_contests`: Fetches upcoming contests from Codeforces, LeetCode, etc.

Full text and comments »

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

30.
By shashwat_nayak, history, 4 years ago, In English
Maximal Square leetcode dp Hi, I was solving this dp question (Maximal square from leetcode). [Question LINK](https://leetcode.com/problems/maximal-square/) Let a be the input array.<br> The correct recurrence relation goes like: <br/> ``` dp[i][j] = min(dp[i - 1][j - 1], min(dp[i - 1][j], dp[i][j - 1])) + 1 ``` <br/> <spoiler summary="Correct code"> ~~~~~ #include <bits/stdc++.h> using namespace std; #define ll long long #ifdef NAYAK #include "/mnt/D/dual/c/debug.h" #else #define DEBUG(x...); #endif #define SPEEDUP ios_base::sync_with_stdio(false);cin.tie(NULL); #define MOD 1000000007 int a[1001][1001],dp[1001][1001]; int rec(int r,int c){ if(a[r][c]==0)return 0; if(dp[r][c]!=-1)return dp[r][c]; int ans=1; if(r>0 && c>0){ int len=min(rec(r-1,c-1),min(rec(r-1,c),rec(r,c-1))); ans=max(ans,1+len); } return dp[r][c]=ans; } void CLEAN(){ int n,m; scanf("%d %d",&n,&m); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ scanf("%d",&a[i][j]); dp[i][j]=-1; ...
Maximal Square leetcode dp, Hi, I was solving this dp question (Maximal square from leetcode).

Full text and comments »

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

31.
By happywobbuffet, history, 18 months ago, In English
A harder/interesting version of Leetcode 3576. Hello! I was solving this [Leetcode](https://leetcode.com/problems/transform-array-to-all-equal-elements/description/) problem yesterday. I'll rewrite the problem statement once again for convenience <spoiler summary="Problem Statement"> You are given an integer array $nums$ of size $n$ containing only $+1$ and $-1$, and an integer $k$. You can perform the following operation at most $k$ times: <br> $·$ Choose an index $i$ $(0 ≤ i < n - 1)$, and multiply both $nums[i]$ and $nums[i + 1]$ by $-1$. Note that you can choose the same index $i$ more than once in different operations. Return $true$ if it is possible to make all elements of the array equal after at most $k$ operations, and $false$ otherwise. </spoiler> <spoiler summary="Examples"> Input: $nums = [1,-1,1,-1,1], k = 3$ Output: $true$ Explanation: We can make all elements in the array equal in $2$ operations as follows: <br> $·$ Choose index $i = 1$, and multiply both $nums[1]$ and $nums[2]$ by $...
A harder/interesting version of Leetcode 3576., Hello! I was solving this [Leetcode ](https://leetcode.com/problems/transform-array-to-all-equal

Full text and comments »

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

32.
By eugenechka.boyko.2_0-0, 19 months ago, translation, In English
Codeforces Round 1022 (based on LCOSHP, Div. 2) こんにちは, Codeforces! ======================== Со времени нашего первого раунда мы многому научились, и поэтому рады пригласить вас принять участие в [Codeforces Round 1022 (Div. 2)](https://codeforces.me/contest/2108), который пройдет в [contest_time:2108]. Раунд будет состоять из **6 OR 7 задач** <s>на реализацию с Leetcode</s>, где **OR** означает операцию побитового «мы не знаем», и **2 часа** на их решение. Некоторые из задач раунда могут быть интерактивными, с их более подробным описанием можно ознакомиться [здесь](https://codeforces.me/blog/entry/45307). Раунд будет рейтинговым **для всех участников с рейтингом ниже 2100**, однако все участники с более высоким рейтингом могут принять участие вне конкурса. Раунд полностью основан на задачах Липецкой командной олимпиады школьников (ЛКОШП), прошедшей недавно в, внезапно, Липецке, поэтому **мы настоятельно просим всех участников олимпиады воздержаться от написания раунда**. Все задачи были придуманы и подготовлены [user:...
[contest_time:2108]. The round will feature **6 OR 7** full Leetcode implementation **problems, [contest_time:2108]. Раунд будет состоять из **6 OR 7 задач** на реализацию с Leetcode, где **OR

Full text and comments »

33.
By happywobbuffet, history, 17 months ago, In English
A Reverse Disjoint Set/Union FInd for Leetcode 3613. Hello, I was solving this [Leetcode](https://leetcode.com/problems/minimize-maximum-component-cost/) problem yesterday. I'll rewrite the problem statement once again for convenience: <spoiler summary="Problem Statement"> You are given an undirected connected graph with $n$ nodes labeled from $0$ to $n - 1$ and a 2D integer array edges where $edges[i] = [u_i, v_i, w_i]$ denotes an undirected edge between node $u_i$ and node $v_i$ with weight $w_i$, and an integer $k$. You are allowed to remove any number of edges from the graph such that the resulting graph has **at most k connected components**. The cost of a component is defined as **the maximum edge weight in that component**. If a component has no edges, its cost is $0$. Return the minimum possible value of the maximum cost among all components after such removals. </spoiler> <spoiler summary="Examples"> <spoiler summary="Example 1"> **Example 1:** `Input `: $n = 5$, $edges = [[0,1,4],[1,2,3],[1,3,2],[3,4,...
A Reverse Disjoint Set/Union FInd for Leetcode 3613., Hello, I was solving this [Leetcode ](https://leetcode.com/problems/minimize-maximum-component-cost

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

34.
By Priyansh31dec, 18 months ago, In English
2 Years of Helping Beginners Upsolve Contests at TLE Eliminators Hello, Codeforces! We, the team at TLE Eliminators, are glad to announce the 2nd Anniversary of our Post Contest Discussion Series on Youtube. These discussions were born out of a simple but crucial idea, the importance of **Upsolving**, which helps you identify gaps in your knowledge and directly results in growth in your CP ability. ### How it started: 4 years ago, when I was actively participating in Codeforces contests, I used to have a post-contest call with my ICPC teammate &mdash; [user:parth20,2025-05-28], to discuss problems and our ideas. As I went on to start my Youtube channel later, I realised that upsolving was a major issue for most people, especially beginners who struggled to read text editorials. That's when I started uploading the recordings of our calls on Youtube and to my surprise, it blew up. We started getting 4-5k views on average on each video. Later, as I started TLE Eliminators and got busy with other things in life, I could hardly find time to ...
milestones: - Covered solutions for 350+ contests from Codeforces, Codechef and Leetcode

Full text and comments »

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

35.
By jo_on, history, 4 years ago, In English
Simple competitive programming badges for GitHub profile... returned! Hi Codeforces! Two years ago, I [posted a blog](https://codeforces.me/blog/entry/82215) about [cp-badges](https://github.com/joonhyungshin/cp-badges), a simple competitive programming badge I made for fun. To the best of my knowledge, it was the first GitHub badge ever for competitive programmers! However, it was only my personal toy project, and the server was running on a machine of the algorithm club in my college, which was unstable and unreliable. Here is what happened: since the club homepage moved to GitHub pages, few people cared about club's machine, and after the machine was turned off due to some power maintenance, it was gone forever. I was also busy applying for graduate school, didn't do any competitive programming, so I forgot about this toy project as well. A few years later, I got some spare time, so I started some programming (including CP) again. Then I noticed that some people actually tried to use this badge! So I decided, still for fun, to revive cp-b...
://vercel.com/) and is a bit slower, but supports more platforms like Yukicoder andLeetcode. - [cf-stats

Full text and comments »

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

36.
By sathiya, 18 months ago, In English
I made VsCode Extension to solve Codeforces and CSES in VsCode I've been working on a VS Code extension that brings together Codeforces, CSES, and popular CP sheets directly into VsCode. Inspired by the LeetCode VS Code extension and Competitive Programming Helper (CPH), I've integrated their functionalities and added some unique features to enhance your CP experience. Features: ------------------ - **Codeforces Integration**: Browse problems by rating, tags, or contests. View upcoming contests too. - **Sort problems**: You can sort problems by solved count or contest order - **CSES Problem Set**: Access the entire CSES problem set within VS Code. - **CP Sheets**: Includes CP-31 and A2OJ ladders for structured practice. - **Color-Coded Problems**: Problems are color-coded based on their rating, similar to Codeforces user profiles. - **In-Editor Problem Descriptions**: View problem statements, input/output specs, sample test cases, tags directly in VS Code. - **Integrated Testing and Submission**: Built-in testing and submission functi...
sheets directly into VsCode. Inspired by the LeetCode VS Code extension and Competitive Programming

Full text and comments »

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

37.
By drexdelta, history, 2 years ago, In English
How to solve this graph problem in O(N^2) ? [Hi all, I have just now solved this leetcode problem in O(N^3).](https://leetcode.com/problems/divide-nodes-into-the-maximum-number-of-groups) I am curious if we can solve this problem in O ( N ^ 2 ) ? For those, who are interested in understanding O ( N ^ 3 ) approach, please let me know, I will try my best to explain. <spoiler summary="MY code for O ( N ^ 3 )"> ``` class Solution { public: vector<int> clr; vector<int> dis; vector<int> newVisitedNodes; vector<vector<int>> graph; bool hasBipartiteSplit(int node) { newVisitedNodes.clear(); bool hasSplit; newVisitedNodes.push_back(node); queue<int> q; q.push(node); clr[node] = 0; dis[node] = 0; while(q.size()) { int curNode = q.front(); int curClr = clr[curNode]; int nextClr = curClr ^ 1; for(auto nbr: graph[curNode]) { if(clr[nbr] == -1) { ...
[Hi all, I have just now solved this leetcode problem in O(N^3).](https://leetcode.com/problems

Full text and comments »

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

38.
By SiddharthJoshi, 2 years ago, In English
CodePlus Long 2024 Editorial [contest:540279] ================== [problem: 540279A] <spoiler summary="Tutorial"> The problem boils down to finding the number of coordinates between $A_i$ and $A_{i+1}$ which are divisible by $k$ .Where $i$ is even considering $0$ based indexing. </spoiler> <spoiler summary="Code"> ```c++ #include<bits/stdc++.h> using namespace std; #define ll long long ll floor(ll x, ll m) { ll r = (x % m + m) % m; return (x - r) / m; } int main() { int t; cin >> t; while (t--) { ll n, k, ans = 0; cin >> n >> k; vector<ll>a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < n; i += 2) { ans += floor(a[i + 1] - 1, k) - floor(a[i] - 1, k); } cout << ans << endl; } } ``` </spoiler> [problem:540279B] <spoiler summary="Hint "> This is a modified version of a popular problem $Dungeon$ $Game$.Try to solve...
[Leetcode](https://leetcode.com/problems/dungeon-game/description/)

Full text and comments »

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

39.
By QWQ.Maple, history, 3 years ago, In English
Learning Notes on Luogu P10254 (Well-known in China) Problem Link: https://www.luogu.com.cn/problem/P10254 **1. Problem Statement** Given a permutation $p$ of length $n$, define $Inv(p)$ to be the inversion of $p$ and $W(p) := \sum\limits_{i=1}^n ip_i$. For example, if $p = [1, 2, 3]$, $W(p) = 1 \times 1 + 2 \times 2 + 3 \times 3 = 14$. Given integers $n$ and $k$, compute $\sum\limits_{p \in S_n,\,Inv(p) = k} W(p)$ modulo $998244353$. For example, if $n = 3, k = 2$, then there are two permutations whose inversion is $2$: $[2, 3, 1]$ ($W = 1 \times 2 + 2 \times 3 + 3 \times 1 = 11$) and $[3, 1, 2]$ ($W = 1 \times 2 + 2 \times 3 + 3 \times 1 = 11$). Therefore, the answer is the sum of $W$ of these two permutations, i.e., $11 + 11 = 22$. Also, the answer for $n=7,\,k=5$ is $22066$. $n \leq 300;\,k \leq \frac{n(n-1)}{2}$. **2. Some trials** First, I considered fixing $p_i = j$, and tried to figure out: **Q1:** How many permutations are there such that $p_i = j$ and the inversion is $k$? If Q1 were solved efficiently, the...
+ 1)$, Then, similar to [Leetcode 629](https://leetcode.com/problems/k-inverse-pairs-array/),, common Leetcode-hard problem ([Leetcode 629](https://leetcode.com/problems/k-inverse-pairs-array

Full text and comments »

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

40.
By Lvl_Insane, history, 19 months ago, In English
Trie without Pointers !! <h3>Hello Codeforces Community!</h3> This is my first ever blog on Codeforces and I’m super excited to be here! <br/><br/> <spoiler summary="Please read this before proceeding"> I want to let you know that this is not a tutorial blog. There are already plenty of well-written tutorials (including video tutorials) available out there. This blog is focused exclusively on the implementation, assuming that you are already well-versed in Trie and Bit Trie. </spoiler> <spoiler summary="The purpose of this blog"> This blog is intended for those seeking the template, and it also includes additional valuable content. Please ensure to read the entire blog. </spoiler> <spoiler summary="The Story Behind This Blog"> Recently, I encountered a problem that could be solved using a Trie(specifically Bit Trie). This sparked my interest in learning the data structure to tackle that specific problem. However, I soon realized that nearly every tutorial out there implements a Trie usin...
[Leetcode submission](https://leetcode.com/problems/network

Full text and comments »

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

41.
By Full_House, history, 17 months ago, In English
Leet-Search – Semantic LeetCode Search Engine Leet-Search – Semantic LeetCode Search Engine **Find problems by idea, not title.** [Try it here](https://leet-search-gray.vercel.app) | [GitHub](https://github.com/Eli4479/Leet-Search) Have you ever been in an online assessment or interview and thought: *"I’ve solved this before on LeetCode... but what was it called?"* That’s exactly the problem **Leet-Search** aims to solve. It’s a **semantic search engine** that helps you find LeetCode problems by describing the **concept** or **idea**, rather than needing to recall the exact title or keywords. For example, typing “greedy scheduling with meeting rooms” or “DFS on binary tree with path sum” will return the closest matching problems — even if your phrasing is different from the original title. --- ### Why use Leet-Search? * During OAs or interviews when memory fails * For quick concept-based revision * To explore similar problems around a topic * When you only remember the logic, not the name Whether you'r...
Leet-Search – Semantic LeetCode Search Engine, **Leet-Search builds on the same idea, but focuses specifically on LeetCode**, where semantic, It’s a **semantic search engine** that helps you find LeetCode problems by describing the **concept, LeetCode... but what was it called?"*

Full text and comments »

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

42.
By EP11LU, 4 months ago, In Russian
Список полезных ресурсов — «Цикл постов. Часть 7» **САЙТЫ С ЗАДАЧАМИ И СОРЕВНОВАНИЯМИ:** * [Codeforces](https://codeforces.me/) — одна из главных площадок для изучения и практики спортивного программирования. Здесь регулярно проходят соревнования, а огромный архив задач позволяет тренироваться практически на любом уровне — от начинающего до очень высокого. <spoiler summary="Возможности Codeforces"> * На Codeforces регулярно проводятся соревнования, разделённые по уровням. Задачи в соревнованиях очень полезны и часто отражают актуальные направления спортивного программирования. Участие в раундах является важной и неотъемлемой частью подготовки к олимпиадам. * В разделе **EDU** содержится отличный курс по алгоритмам и структурам данных. * В разделе **Тренировки** можно найти задачи с самых разных олимпиад со всего мира. Решение таких задач поможет лучше подготовиться к соревнованиям OI-формата. * В блогах Codeforces содержится очень много полезных материалов: интересные идеи, обсуждения, объяснения алгоритмов и разбор...
* [LeetCode](https://leetcode.com/) — содержит большое количество алгоритмических задач практически

Full text and comments »

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

43.
By hirenjoshi, history, 13 months ago, In English
Ultimate Dynamic Programming Series on LeetCode ## ULTIMATE DP SERIES LINK DROP! ## Now Video Lectures Are Available — [Playlist Link](https://opener.one/yt/q4fd5s) Hello! I'm excited to share my Dynamic Programming Series! I've created a comprehensive Dynamic Programming series featuring **160+ problems**, with **115+ problems sourced from [LeetCode](https://leetcode.com/u/LeetCode/)**. This series covers **12 different DP patterns**, ranging from **1D to Graph DP**, with a strong focus on **medium and hard-level problems**. In each folder, the problems are sequenced based on their serial order, so start with the problem labeled Serial 1, then move to Serial 2, and so on. Learn the patterns in the following order (click the pattern to jump to the specific folder): - [Introduction To DP](https://github.com/hiren-j/dsaAffection/tree/C%2B%2B/Dynamic%20Programming/Introduction%20To%20DP) - [1D DP](https://github.com/hiren-j/dsaAffection/tree/C%2B%2B/Dynamic%20Programming/1D%20DP) - [Multi Dimensional DP](https://github....
Ultimate Dynamic Programming Series on LeetCode, from [LeetCode](https://leetcode.com/u/LeetCode/)**. This series covers **12 different DP patterns, the end, you'll have solved **115+ [LeetCode](https://leetcode.com/u/LeetCode /) Dynamic Programming, + problems sourced from [LeetCode](https://leetcode.com/u/LeetCode/)**. This series covers **12, . #DynamicProgramming #LeetCode #Coding #ProblemSolving #SoftwareEngineering #DSAisLove #Codeforces

Full text and comments »

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

44.
By priyanshu-thapliyal, history, 2 years ago, In English
Codeforces and LeetCode: Maintaining Competition Integrity with Coders One (Cheat Detector) Codeforces and LeetCode: Maintaining Competition Integrity with Coders One ### **The Competitive Edge of Codeforces and LeetCode** Codeforces and LeetCode are renowned for their challenging problems and dynamic contests, providing a platform for coders to test their skills and gain recognition. However, with high stakes come the inevitable attempts at gaining unfair advantages, making the need for robust cheat detection systems essential. ### Introducing the Cheat Detectors Coders One is proud to present dedicated cheat detectors for both Codeforces and LeetCode. ### Codeforces Cheat Detector: Our Codeforces cheat detector operates with an 85% accuracy rate. It uses simple observation based algorithms to scrutinize user activities and detect anomalies that indicate cheating. By ensuring that only legitimate efforts are rewarded, it helps preserve the integrity of the Codeforces community. ### LeetCode Cheat Detector: With a 70% accuracy rate, our LeetCode cheat detector i...
both Codeforces and LeetCode., extensions for both LeetCode and Codeforces are in the works! These browser extensions will offer real, performance tracking for every contest on LeetCode and Codeforces. Our platform provides users with, ### **The Competitive Edge of Codeforces and LeetCode** Codeforces and LeetCode are renowned for, ### LeetCode Cheat Detector: With a 70% accuracy rate, our LeetCode cheat detector is designed to, **Coders One on Vercel -** https://coders-one.vercel.app/leetcode/cheat-detector, Codeforces and LeetCode: Maintaining Competition Integrity with Coders One

Full text and comments »

45.
By vishwas_16.0, history, 10 months ago, In English
Editorial - Codeguerra Editorial &mdash; Codeguerra ================== [contest:663321] ------------------ [Problem A : Hawkins Rift](https://codeforces.me/gym/663321/problem/A) <br> Author : [user:vishwas_16.0,2026-01-30] <spoiler summary="Hint 1"> Notice that the rift at index $n$ is always stable, because $a_n \le n$ for every possible value.</spoiler> <spoiler summary="Hint 2"> $n$ can be as large as $10^{18}$. Do we really need to compute factorial up to that value? Think about the modulus $69696$ </spoiler> <spoiler summary="Solution"> We want arrays where after choosing exactly one index $i$ and setting $a_i=i$, there is exactly one stable rift ($a_i \le i$). All other positions must be unstable $\Rightarrow a_j > j$. Since position n is always stable eleven has no choice but to chose it. There are total of n different values for last index $\rightarrow n$ ways. Number of choices for rest: <ul> <li>Index 1 $\rightarrow (n-1)$ choices</li> <li>Index 2 $\rightarrow (n-2)$ choi...
First solve the classic LeetCode **Cat and Mouse** problem (retrograde

Full text and comments »

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

46.
By _Depressed, history, 2 years ago, In English
LeetCode Amazon interview problems **LeetCode** FAANG interview problems solved | [LinkedIn post](https://www.linkedin.com/posts/mohamed-samir-9b0b2a203_programming-leetcode-coding-activity-7212762595429085185-7PHy?utm_source=combined_share_message&utm_medium=member_desktop) Excited to share a valuable resource for all job seekers targeting big companies! This Google Sheet, created by me, is tailored for those preparing for interviews at major firms. **Amazon Interview Problems Sheet** - [Sheet link](https://lnkd.in/ddAZPvWt) - [GitHub repo](https://lnkd.in/dfr6dSdt) </p> **What’s Inside:**</p> - **Amazon** Company-Wise Questions from **LeetCode**, snapshot of interview questions from 2022 - Well-categorized based on difficulties, solved/unsolved, and premium/non-premium - My solution link is attached to the sheet (if I have already solved the problem , stay tuned for more upcoming solutions) If you have **LeetCode Premium** and want to **contribute** by adding newer snapshots, please re...
LeetCode Amazon interview problems, **LeetCode** FAANG interview problems solved | [LinkedIn post](https://www.linkedin.com/posts, - **Amazon** Company-Wise Questions from **LeetCode**, snapshot of interview questions from 2022, If you have **LeetCode Premium** and want to **contribute** by adding newer snapshots, please read

Full text and comments »

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

47.
By Errichto, 7 years ago, In English
My Coding Streams in May&June You can watch me on https://www.twitch.tv/errichto or https://www.youtube.com/errichto2. There is schedule with countdown on Twitch. Most likely I will stream in May on Tuesday mornings and Sunday evenings. - [May 3, 16:45 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20200503T1645&p1=262) &mdash; **Codeforces hard** (solving hard problems because the round was moved) - [May 5, 9:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20200505T09&p1=262) &mdash; **Boring Programming Stream** (planning videos, fixing chatbot, maybe learning Berlekamp–Massey) - [May 10, 18:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20200510T18&p1=262) &mdash; **Atcoder hard** (Grand Contest 43?) - [May 12, 9:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20200512T09&p1=262) &mdash; **Atcoder hard** or something similar to practice for Google Code Jam. - [May 17, 18:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.htm...
Leetcode Challenge** (I will try to solve 30 problems in 1 hour. This is more mainstream so will be on the, ](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20200531T18&p1=262) **MayLeetcode

Full text and comments »

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

48.
By Arpa, history, 18 months ago, In English
[Tutorial] Next Smaller Jumping (NSJ) Do you know the _monotonic stack_? You’ll learn something easier to understand with **shorter code**! We’re going to discuss a common fundamental problem that you may face as part of other problems. The _Next Smaller Element (NSE)_ problem. **Problem Statement** Given an array $a$, for each index $i$, find $next_i$, which is the first index to the right of $i$ that is smaller than $a_i$. **Example** Let's say $a = [5, 8, 2, 6, 7, 9, 1, 2]$. The output (zero-based) is $next = [2, 2, 6, 6, 6, 6, 7, 7]$. ![ ](https://algoritmiacademy.com/wp-content/uploads/2025/06/next-smaller.png) ## NSJ Algorithm Let’s begin with a simple, **non-optimal** solution. ~~~~~ for (int i = n - 1; i >= 0; --i) { next[i] = i + 1; while (next[i] != n && a[i] <= a[next[i]]) ++next[i]; } ~~~~~ The time complexity of the above code is $\mathcal{O}(n^2)$. What if I reduce it to $\mathcal{O}(n)$ by changing only **one line**? _Think before you continue..._ <br> <br> ...
://www.hackerrank.com/contests/coding-gym-mo1018/challenges/the-next-greater-element/problem) - [LeetCode, and LeetCode—none used the NSJ trick. I also queried several AI tools to see whether this algorithm

Full text and comments »

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

49.
By Errichto, 6 years ago, In English
My Coding Streams in September 2020 You can watch me live on https://www.twitch.tv/errichto or see stored broadcasts on https://www.youtube.com/errichto2. I will start with a week of daily streams and then it's just when I have time. * [September 8, 18:30 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20200908T1830&p1=262) &mdash; Codeforces Round #668 ([recording](https://youtu.be/h8W0omsVETo)) * [September 9, 17:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20200909T17&p1=262) &mdash; chatting with viewers, random stuff ([recording](https://youtu.be/9Z8MgTBmOIs)) * [September 10, 17:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20200910T17&p1=262) &mdash; 1v1 lockout against [user:Merkurev,2020-09-09] ([recording](https://youtu.be/lY2-stOhkVQ)) * [September 11, 17:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20200911T17&p1=262) &mdash; recent Codechef lunchtime and cook-off contests ([recording](https://youtu.be/xc_RBsSw2mI)) * [Sep...
=20200922T10&p1=262) — coding interviews problem-solving: Leetcode and binarysearch.com ([recording

Full text and comments »

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

50.
By coris, history, 5 years ago, In English
[Tutorial] Recursion This tutorial will cover explicit use of recursion and its implementation in problems. This topic is not used directly to solve problems in contests but rather is an essential tool in Dynamic Programming, Tree algorithms, Graph Traversal, etc. Topics like time complexity and space complexity of recursive function are not discussed in this tutorial. # What is recursion? When a function calls itself, then its called recursion. That is the most basic definition. This definition is enough when you need to solve basic problems like fibonacci series, factorial, etc. This is the implicit use of recursion. Problems like printing all permutations, combination or subsets uses explicit use of recursion also known as "Complete Search". # Approach to solve a problem recursively When solving a problem through recursion one must think of breaking the current problem into sub-problem. Sub-problem is chosen such that we can keep on breaking the sub-problems until we reach a sub-proble...
using leetcode problems)., [Climbing Stairs — LeetCode](https://leetcode.com/problems/climbing-stairs/), [Combination Sum — LeetCode](https://leetcode.com/problems/combination-sum/), [Combinations — LeetCode](https://leetcode.com/problems/combinations/), [Generate Parentheses — LeetCode ](https://leetcode.com/problems/generate-parentheses/), [Letter Combinations of a Phone Number — LeetCode ](https://leetcode.com/problems/letter, [Palindrome Partitioning — LeetCode ](https://leetcode.com/problems/palindrome-partitioning/), [Partition to K Equal Sum Subsets — LeetCode ](https://leetcode.com/problems/partition-to-k, [Permutations — LeetCode](https://leetcode.com/problems/permutations/)

Full text and comments »

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

51.
By IterumSurgo, history, 5 months ago, In English
Big Leetcode BUG!! Hello Codeforces, I noticed something interesting about LeetCode’s external paste detection. When you copy text from the LeetCode contest editor, it seems to attach a hidden marker like: ©leetcode You usually do not see it during normal paste, but it can sometimes appear in clipboard history, for example with Win + V on Windows. Now here is the funny part. This marker seems quite easy to recreate manually. So if someone adds the same marker to external text, LeetCode may still treat it as if the content came from the contest editor. Basically, LeetCode sees ©leetcode and says: “Looks original to me. Approved.” Of course, this is not very reliable. The concern is not that paste detection exists. Contest fairness is important, and nobody wants a leaderboard where the real problem is guessing who pasted faster. The issue is relying on a marker that users can recreate. This can lead to possible bypasses, false positives, and a detection system that trusts a s...
Big Leetcode BUG!!, I wrote a fuller breakdown here: [Blog](https://leetcode.com/discuss/post/8379425/how-leetcode, So if someone adds the same marker to external text, LeetCode may still treat it as if the content, When you copy text from the LeetCode contest editor, it seems to attach a hidden marker like:, ©leetcode

Full text and comments »

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

52.
By um_ashit, history, 11 months ago, In English
A Christmas Gift for CP: CodeMentor ## CodeMentor: Your AI-Powered Companion for Competitive Programming Hi Codeforces! I'm excited to share **CodeMentor** &mdash; a Chrome extension I built that gives you progressive AI hints and explanations when you're stuck on problems, without spoiling the solution. It's designed to help you learn and grow, whether you're practicing for contests or preparing for interviews. ## What It Does **For Codeforces & CodeChef (Competitive Programming):** Get progressive hints to improve your CP skills without spoiling solutions. Perfect for when you're stuck during practice or want to understand a problem better after a contest. **For LeetCode (Interview Preparation):** Get detailed explanations and hints to understand problems better for technical interviews. Learn problem-solving patterns and approaches that interviewers look for. --- ## Features That Will Help You ### Progressive AI Hints & Explanations **The Problem:** You're stuck on a problem. You've been sta...
) and interview prep (LeetCode). Features: hints, contest tracking, unified streaks, problem timer, **For LeetCode (Interview Preparation):** Get detailed explanations and hints to understand, - **Multi-platform tracking** — Automatically tracks upcoming contests from LeetCode, - **Unified streak** — Combines your activity from LeetCode, Codeforces, and CodeChef into, 1. Navigate to any problem on LeetCode, Codeforces, or CodeChef 2. Click the **lightning bolt

Full text and comments »

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

53.
By RangeyBhakt, history, 2 years ago, In English
Leetcode Problem ELOs Hello Everyone! So as we all know codeforces offers ELO Ratings for Problems based on how many people of what rating managed to beat a problem in a contest out of a given space of participating users. This allows for some very important things such as the user being able to filter out problems effectively since it's easy to compare relative difficulties with the ELO Ratings. But as you might know, there is no such feature on Leetcode. Hence it is hard for people to filter out problems relative to the difficulty of their solved sample space of problems. On Leetcode there is only a very broad categorization of problems into three categories, easy, medium and hard. This results in problems such as the age old problem of Medium Problem space being too large and random, ranging from the most basic of algorithms to Problems that require Good Implementation with Adhoc. Using [Clist](https://clist.by/)'s API, I have made a simple site that displays problems in decreasing order of...
Leetcode Problem ELOs, might know, there is no such feature on Leetcode. Hence it is hard for people to filter out problems, But as you might know, there is no such feature on Leetcode. Hence it is hard for people to filter

Full text and comments »

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

54.
By -739397, 19 months ago, In English
10x Your CP Workflow: A Smooth Bash Script to Automate Parsing, Testing, Stressing and many more # 10x Your CP Workflow: A Smooth Bash Script to Automate Parsing, Testing, Stressing and many more Hello Codeforces fam, Over the past few months, I've been building and using a personal tool that **completely automates** my competitive programming workflow. From **parsing** problems to **checking solutions**, **stress testing**, **debugging**, and even **validating edge cases** — this tool has made my life 10x easier and smoother. And now, I’m excited to share it with you so that you can boost your productivity! ## What is this tool? It’s a **template-driven Bash script** designed to integrate with [Competitive Companion](https://github.com/jmerle/competitive-companion) and streamline everything — whether you're solving problems on **Codeforces, AtCoder, LeetCode, CodeChef**, or anywhere else. With just one command, you can: - Parse problems - Compile and run code - Switch between fast and debug modes - Stress test using a brute-force checker - Validate solutio...
on **Codeforces, AtCoder, LeetCode, CodeChef**, or anywhere else.

Full text and comments »

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

55.
By __LOOSER__, history, 4 years ago, In English
Bit Manipulation Tutorial Hello , lets start from a basic question that can be solved using Binary number's Knowledge. [LeetCode Poor Pig](https://leetcode.com/problems/poor-pigs/) ||| [Video Solution of Poor Pig](https://youtu.be/4U1ZZYPuXr4) Basically in above question you are given n number of poison bottle, and t number of trial you can do ,how many minimum pig you need to find the bottle with poison. <spoiler summary="Solution using Binary number knowledge"> let say number Bottle is 2 and one trial then how many pig we need ? 1 because we are going to feed first bottle to pig 1 if dies then there there is poison in bottle 1 otherwise there is poison in bottle 2. We can generalize above idea for in binary number.How? Lets name all bottle from 1 to N . if in poison bottle I want to know whether in its binary representation first digit is 0 or 1 to do that I will feed pig 1 all bottle in which first digit is one (like 1,3,5,..) if Pig 1 dies then first digit (in binary representatio...
[LeetCode Poor Pig](https://leetcode.com/problems/poor-pigs/) ||| [Video Solution of Poor Pig, [Leetcode Maximum Product of Word Lengths](https://leetcode.com/problems/maximum-product-of-word, [Leetcode Number of Valid Words for Each Puzzle](https://leetcode.com/problems/number-of-valid

Full text and comments »

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

56.
By shisukenohara, history, 2 years ago, In English
Launching a New Tool for Competitive Programmers: The First Code Compiler with Hacking Capabilities! ###**Link To My Website** [Try It Out!!](https://competitive-programming-compiler.tiiny.site/) ### **Features** The website allows you to run code with [stdin](https://www.lenovo.com/in/en/glossary/stdin/?srsltid=AfmBOoo9WtF4PMa-UI2UUwqHa4e04Rc1LjtnBEkhQ0XFr9h5QUSSrikC) in [Python3](https://docs.python.org/3/tutorial/) or [C++17](https://en.cppreference.com/w/cpp/17) and it also allows you to smoothly try to hack someone else's solution smoothly via manually written test cases or generator (PS: It also tells if the code gives [TLE](https://www.reddit.com/r/leetcode/comments/ztca6u/sorry_im_new_to_leet_code_what_does_time_limit/) or [MLE](https://www.reddit.com/r/leetcode/comments/admwcg/what_does_memory_limit_exceeded_mean_when/)). - Edit: As pointed out by [user:near_ai,2024-10-31], A new feature is added that doesn't let you run malicious code or the code which can potentially be harmful for the system. - Edit: Added the feature that lets input allowed Time (in seconds) and ...
generator (PS: It also tells if the code gives [TLE](https://www.reddit.com/r/ leetcode/comments/ztca6u

Full text and comments »

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

57.
By abhaysp, history, 3 years ago, In English
DP: Converting a memoized solution to tabulated one I started practicing some DP problems. For some easy problems (like when there's only 1 arg whose value is changing in each recursive call) I'm able to change the memoized solution to tabulated solution. But I'm finding it hard for to do this when there are `>= 2 args` whose value is changing in each recursive call (and which are not very straightforward). For ex:. Here's one question from leetcode contest (I hope pasting leetcode link here is not a problem): https://leetcode.com/contest/weekly-contest-359/problems/maximize-the-profit-as-the-salesman/ I was able to write a recursive (and thus memoized solution) but I couldn't figure out how to do it in tabulated form Here's the memoized solution: ~~~~~ class Solution { vector<vector<int>> space; public: int maximizeTheProfit(int n, vector<vector<int>>& offers) { int on = (int)offers.size(); sort(offers.begin(), offers.end(), [&](vector<int>& o1, vector<int>& o2) { return...
Here's one question from leetcode contest (I hope pasting leetcode link here is not a problem

Full text and comments »

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

58.
By Ashra4f, history, 19 months ago, In English
Contest Time Conflict: Codeforces vs. LeetCode Biweekly Hey everyone, I’ve noticed an issue that keeps coming up in the competitive programming community: Codeforces rounds often overlap with LeetCode Biweekly Contests. LeetCode Biweekly Timing Every other Saturday Always at 14:30 UTC Fixed and predictable schedule The Problem Despite this consistency, Codeforces often schedules rounds at the same time. This overlap forces participants to choose one contest and skip the other. Why It Matters Both contests are valuable for different reasons: LeetCode: Focused on interview preparation and structured problem-solving Codeforces: Great for speed, algorithmic skills, and ratings Live participation is a big part of the experience, and upsolving later isn't quite the same. A Simple Suggestion Since Codeforces rounds are flexible in timing, why not: Shift them by 1–2 hours, or Hold them on a different day, especially since this conflict only occurs once every two weeks This would allow more people to par...
Contest Time Conflict: Codeforces vs. LeetCode Biweekly, Codeforces rounds often overlap with LeetCode Biweekly Contests., LeetCode Biweekly Timing Every other Saturday, LeetCode: Focused on interview preparation and structured problem-solving

Full text and comments »

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

59.
By _maityamit, history, 3 years ago, In English
Introduce LeetCodeWrapped - Get your Year Wise LeetCode Stats... ### Hi Coders !! Introduce **LeetCode Wrapped** ([leetcodewrapped.info](https://www.leetcodewrapped.info/)) &mdash; Get your Year Wise LeetCode Stats... ### About LeetCode Wrapped: **LeetCodeWrapped** is your go-to platform for a quick and comprehensive overview of your LeetCode journey over the years you are active. Simply enter your username, and get instant access to all your profile stats presented on a single screen. Our user-friendly interface makes it easy to visualize your performance. What's more, you can download your stats for offline use and share your achievements on social media directly from the platform. Experience the convenience of tracking and showcasing your coding accomplishments with LeetCodeWrapped – simplifying your leetcode journey... ### What Stats You will get? **Card 0:** Total No of Submissions, Active Days, Maximum Streak, Most Active Month, Most Active Day. **Card 1:** Live Contest attended, Average Qns Solved in Contest, Maximum Rating,...
Introduce LeetCodeWrapped - Get your Year Wise LeetCode Stats..., ### About LeetCode Wrapped: **LeetCodeWrapped** is your go-to platform for a quick and, ### Hi Coders !! Introduce **LeetCode Wrapped** ([leetcodewrapped.info](https, Introduce **LeetCode Wrapped** ([leetcodewrapped.info](https://www.leetcodewrapped.info/)) &mdash

Full text and comments »

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

60.
By Errichto, 7 years ago, In English
Kickstart & Leetcode live stream (post-contest) There are two mainstream contests tomorrow (Google Kickstart and Leetcode biweekly) and I will make a live stream just after them at [18:30 CEST on Saturday](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20191019T1830&p1=262). After talking about some problems from those contests, I will upsolve Codeforces or Topcoder problems, maybe from a recent CF round by tourist. Watch me on Youtube &mdash; [https://youtu.be/w3W-w0EXEtc](https://youtu.be/w3W-w0EXEtc).
Kickstart & Leetcode live stream (post-contest), There are two mainstream contests tomorrow (Google Kickstart and Leetcode biweekly) and I will make

Full text and comments »

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

61.
By MubtasimSajid, 2 months ago, In English
A browser extension for procrastinating CPers Hello, everyone! [Rahinur Bin Naushad](https://codeforces.me/profile/foot_ball) & I have something to present. Inspired by CodingSloth's [YouTube video](https://youtu.be/e4ReFOWMG9o) on making the [LeetCode Torture](https://github.com/The-CodingSloth/haha-funny-leetcode-extension) browser extension, we decided to run with the same idea & port it to our favourite CP platform — Codeforces! Introducing [Codeforces Torture](https://github.com/al-muqarrabun/Codeforces-Torture)! ![Codeforces Torture logo](https://raw.githubusercontent.com/al-muqarrabun/Codeforces-Torture/main/firefox/icons/logo-128.png) This browser extension aims at encouraging (read: "forcing") programmers to practice & solve at least one problem on Codeforces every day. It fetches a random problem from the rating range provided by the user, & until at least one problem has been solved on Codeforces that day, any links other than those belonging to Codeforces' domain are blocked with a pop-up encouraging t...
Inspired by CodingSloth's [YouTube video](https://youtu.be/e4ReFOWMG9o) on making the [LeetCode

Full text and comments »

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

62.
By Jomax100, history, 3 years ago, In English
Time complexity of string.substr() According to https://cplusplus.com/reference/string/string/substr/ Complexity = Unspecified, but generally linear in the length of the returned object. However, I believe in practice it's much faster, specially for repeated calls with same start_pos. Example problem: https://leetcode.com/contest/weekly-contest-377/problems/minimum-cost-to-convert-string-ii/ Solution from contest winner below <spoiler summary="Solution"> ~~~~~ const int N = 300; const long long INF = 0x3F3F3F3F3F3F3FLL; long long dis[N][N]; class Solution { public: long long minimumCost(string source, string target, vector<string>& original, vector<string>& changed, vector<int>& cost) { map<string, int> label; for (auto& v : original) { label[v]; } for (auto& v : changed) { label[v]; } int total = 0; for (auto& it : label) { it.second = total++; } for (int i = 0...
Leetcode)?**

Full text and comments »

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

63.
By Ascension36, history, 9 months ago, In English
I made a CP timer where missing the time limit might delete your OS. Hello everyone! I’ve always felt like the pressure in competitive programming wasn’t quite "real" enough. Sure, you lose some rating points, but where is the real skin in the game? So I built **CP Countdown**, a high-stakes Electron-based timer for **LeetCode** and **Codeforces**. [Website link](https://machamelli.github.io/CP-Countdown/) [GitHub repository for full transparency](https://github.com/Machamelli/CP-Countdown) ![ ](/predownloaded/3c/b0/3cb080ded676ca05eb49f4f1efb8214b43f480ef.png) ![ ](/predownloaded/ab/bb/abbbcbbaa704e4c4d55f2c2fd83a11649f6f6c32.png) ![ ](/predownloaded/fd/37/fd3747302e39b905dbf26e0969a9241b2973d4c7.png) **How it works:** 1. You pick a problem and set a timer (1–300 mins). 2. The app locks you in (prevents window closure). 3. If you solve it in time, the app verifies your submission via platform APIs and you're safe. 4. If you fail: The app flips a coin. If it lands on the wrong side, it executes a destructive command with...
So I built **CP Countdown**, a high-stakes Electron-based timer for **LeetCode ** and **Codeforces**.

Full text and comments »

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

64.
By H_a_r_M_i_t, history, 20 months ago, In English
Seeking Guidance on My Journey to Candidate Master !! ##### Hey Codeforces _:D_ I’m Harmit [user:H_a_r_M_i_t,2025-04-10] Khimani, and I’ve been steadily working on my competitive programming skills with the goal of reaching **Candidate Master**. I’ve made decent progress so far, but I know there’s still a long way to go, so I’d really appreciate any insights to help me level up faster. [Here’s my profile](https://codeforces.me/profile/H_a_r_M_i_t) if you’d like to take a look. ![ ](/predownloaded/b6/b1/b6b1f92be8b2acd2ca0f60a6f0032c4ae917f262.png) ![ ](/predownloaded/86/29/8629437dd953195207bad362146d647c84b5003f.png) I’m looking for advice and would love feedback on a few things: - Speed and Accuracy Under Pressure: - How do you stay fast *and* accurate when time is tight and pressure kicks in? - Consistency in Contests: - How do you deal with rating ups and downs? What helped you stay steady? - Solving 1600–2000 Rated Problems: - What’s your approach to consistently crack problems in this ...
will start in 3–4 months. So I also need to manage time for LeetCode, CS core subjects, and

Full text and comments »

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

65.
By lvisbl_, history, 2 years ago, In English
Help debug dynamic programming problem! Recently, I have encounter this dynamic programming problem and I can not debug where I have problem, I used forward DP style and I have checked the transition and base case. Please help me to look at it, I'm so frustrating. Thank in advance. Problem link: [leetcode](https://leetcode.com/problems/minimum-total-distance-traveled/) My code: <spoiler summary="code"> ```C++ #define ll long long const ll INF = 1e12; class Solution { public: long long minimumTotalDistance(vector<int>& robot, vector<vector<int>>& factory) { sort(factory.begin(), factory.end()); sort(robot.begin(), robot.end()); vector<int> fact; for (auto& f : factory) for (int i = 0; i < f[1]; i++) fact.push_back(f[0]); int n = robot.size(); int m = fact.size(); // dp[i][j]: min dist if only fix first (i - 1) robots and use first (j - 1) factories (1-based index) vector<vector<ll>> dp(n + 2, vector<ll>(m + 2, INF)); ...
Problem link: [leetcode ](https://leetcode.com/problems/minimum-total-distance-traveled/)

Full text and comments »

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

66.
By Ahnaf.Shahriar.Asif, history, 7 years ago, In English
DP Tutorial and Problem List Today I've listed some DP tutorials and problems. Actually, I made it for my personal practice. But I think It may Help others too. Update: I write stuff [Here](https://duoblogger.github.io) in Bengali. I probably have one or two basic DP tutorials too. If you understand Bengali, it may help. **Note: If you have some other tutorial links and nice problems, mention them. I'll add them here. It'll help me too.** ## Dynamic programming: * [Topcoder Tutorial](https://www.topcoder.com/community/competitive-programming/tutorials/dynamic-programming-from-novice-to-advanced/) * [Dynamic Programming,from novice to advanced](https://www.cnblogs.com/drizzlecrj/archive/2007/10/26/939159.html) * [Learn DP and other tricks](https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation) * [Non-trivial DP tricks](https://codeforces.me/blog/entry/47764) * [Everything about Dynamic Programming](https://codeforces.me/blog/entry/43256) * [Digit DP 1](https://...
=1mtvm2ubHCY&t=72s) * [DP tutorial #3 by Errichto](https://www.youtube.com/watch?v=pwpOC1dph6U) * [Leetcode

Full text and comments »

67.
By Manoj_mk, history, 17 months ago, In English
When to Use Binary Search in Competitive Programming ## When to Use Binary Search in Competitive Programming Binary Search is one of the most powerful tools in a competitive programmer’s toolkit. While it’s classically taught for searching in sorted arrays, its real power lies in solving a wide variety of problems efficiently by reducing the search space. In this blog, we’ll cover **when and how to use binary search**, along with **problem types** where it's especially useful. --- ### Prerequisite You must know the basic binary search algorithm: ```cpp int low = 0, high = n-1; while (low <= high) { int mid = (low + high) / 2; if (condition) low = mid + 1; else high = mid - 1; } ``` --- ## When to Use Binary Search Binary search is applicable when: ### 1. The Answer Lies in a Monotonic Search Space If you can frame the problem such that the answer lies in a **monotonic function** (increasing or decreasing), then binary search can be used to "search the answer". **Examples**: * Mini...
](https://www.spoj.com/problems/EKO/) 3. [Minimum Number of Days to Make m Bouquets —Leetcode

Full text and comments »

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

68.
By apjcoder123, history, 7 months ago, In English
Doubt Hi community, I came across below leetcode problem: URL: https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination/description/ Statement: You are given an m x n integer matrix grid where each cell is either 0 (empty) or 1 (obstacle). You can move up, down, left, or right from and to an empty cell in one step. Return the minimum number of steps to walk from the upper left corner (0, 0) to the lower right corner (m &mdash; 1, n &mdash; 1) given that you can eliminate at most k obstacles. If it is not possible to find such walk return -1. Below mentioned DFS solution is an AC for the problem My doubt: In my code I just made tiny changes: I called help() for cell at 0,0 instead of cell at grid.size()-1,grid[0].size()-1, and my code fails Note: In my code I updated the implementation (base case and manhattan optimization) of help() accordingly Is the solution dependent on direction of dfs, or the test cases might have been weak ?? class Sol...
Hi community, I came across below leetcode problem:

Full text and comments »

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

69.
By Ghatotkacha, history, 21 month(s) ago, In English
Ancestor Tracking on Trees Mastering Ancestor Tracking in Trees Tree problems are crucial for reaching the Above Expert level on Codeforces and the Guardian badge on LeetCode. Some fundamental tree topics include: *DFS *BFS *DP on Trees (In/Out DP) *Rerooting *Binary Lifting *Ancestor Tracking In this blog, we will focus on Ancestor Tracking in trees. ================== Understanding the Problem Statement ------------------ You are given a tree with constraints that must be maintained on a downward path. Consider the following problem from LeetCode: [Longest Special Path](https://leetcode.com/problems/longest-special-path/description/) Problem Statement: ------------------ You are given an undirected tree rooted at node 0 with n nodes numbered from 0 to n &mdash; 1. The tree is represented by a 2D array edges of length n &mdash; 1, where: edges[i] = [ui, vi, lengthi] represents an edge between nodes ui and vi with length lengthi. An integer array nums is given, ...
on LeetCode. Some fundamental tree topics include:, Consider the following problem from LeetCode:

Full text and comments »

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

70.
By shisukenohara, history, 2 years ago, In English
How I Came Up With A New Concept After Brainstorming For My University's Major Project ## **How Codeforces Helped Me Brainstorm a New Concept for My University's Major Project** Personally, I think [Leetcode](https://leetcode.com/) is great for getting started with DSA, [AtCoder](https://atcoder.jp/) is excellent for practicing specific algorithm implementations like Binary Search or DP, and then there’s **Codeforces**, which, for me, is perfect for brainstorming. ### **What Happened with My Major Project** So, a bit of context: I’m working on my University’s Major Project, which involves **[Blockchain](https://en.wikipedia.org/wiki/Blockchain)** and **[Artificial Intelligence](https://en.wikipedia.org/wiki/Artificial_intelligence)**. After presenting the [synopsis](https://en.wikipedia.org/wiki/Synopsis), the panellist told me: I should innovate or implement something that doesn’t exist yet or can improve existing technologies. But how do I innovate in a field as crowded as blockchain? It’s already a mature technology. But then I started to think about the c...
Personally, I think [Leetcode](https://leetcode.com/) is great for getting started with DSA

Full text and comments »

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

71.
By RomeoFantastik, history, 7 years ago, In English
Coronavirus — Overcome the Psychological Stress by Coding My video on the topic: [Shameless Self-Promotion](https://www.youtube.com/watch?v=CFagJwWW7ys) Have you ever noticed how disasters have a weird way of making things better, once the initial problem is contained? Yes, the virus is unpredictable, has deadly potential, and should be of great concern to just about every human on the planet. So, what could possibly be a positive consequence of a life-threatening disease? #### _**1. Code (and live) for the present, not for that offer**_ Yes, these are not the best of times, but a time to reflect on who we are and what is most important in life. For some countries, economy is at risk. But most of Software Engineer jobs give you the opportunity to work remote/from home. Either you have or not a job at the moment, you are not so pressured by this thought anymore. Maybe you come to the conclusion programming is not what you want to do in life anymore. Maybe it's photography, cooking or pottery (Brad Pitt pff..). Or maybe th...
Virtual participate in a CF round, solve a LeetCode Interview Question(or make fun of me solving

Full text and comments »

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

72.
By TheAnonymousAMGR, history, 3 years ago, In English
Add binary in c++ Method: Adding the digits and any carry-over value at the right end of each binary integer, we store the result in a new string. The procedure is now repeated for the following digit on the left until all of the digits in both binary numbers have been reached. After adding all the digits, if there is any remaining value, add it to the end of the new string. The new string is then returned as the total of the two binary numbers after being inverted. ~~~~~ Your code here... #include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; string ans; int carry = 0; int i = a.length() &mdash; 1; int j = b.length() &mdash; 1; while (i >= 0 || j >= 0 || carry) { if (i >= 0) carry += a[i--] - '0'; if (j >= 0) carry += b[j--] - '0'; ans += carry % 2 + '0'; carry /= 2; } reverse(begin(ans), end(ans)); for (int i = 0; i < ans.size(); i++) ...
[Learn from YT and Leetcode]

Full text and comments »

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

73.
By jobin491, history, 20 months ago, In English
Need Help with analyzing the complexity of a problem Recently I solved a leetcode problem with a complexity of O(n*logn) however it beats almost all O(n) solutions in terms of runtime. Could anyone help me analyze the complexity of my solution. i also noticed that the while loop only goes on for about 3-4 iterations on some test cases that i tried although i am not sure if this is the case for all testcases. [Problem](https://leetcode.com/problems/dota2-senate/): In the world of Dota2, there are two parties: the Radiant and the Dire. The Dota2 senate consists of senators coming from two parties. Now the Senate wants to decide on a change in the Dota2 game. The voting for this change is a round-based procedure. In each round, each senator can exercise one of the two rights: Ban one senator's right: A senator can make another senator lose all his rights in this and all the following rounds. Announce the victory: If this senator found the senators who still have rights to vote are all from the same party, he can announce the v...
Recently I solved a leetcode problem with a complexity of O(n*logn) however it beats almost all O(n

Full text and comments »

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

74.
By ChaosAngel, history, 7 years ago, In English
Thoughts on Div4 When my friends first told me that there was going to be a div4 in a few days, I laughed it off and told them to get real. Presto chango, here we have a div 4! I have mixed feelings about this frankly. Yes, the demand is rising, and we have a massive amount of registrants. However this could be in large part due to the recent pandemic, and not a permanent fixture. This could have positive effects for the community, in terms of having a lower entrance barrier for newbies and less skilled programmers, and a softer introduction to the world of competitive programming. The website can establish itself as a larger presence in the algorithmic programming world. At the same time, is that the fundamental character of this site?? Codeforces is known for offering a more ad-hoc, difficult problem set that is more suitable for ICPC, IOI, GCJ, Hackercup participants than your classic job interview website (Leetcode). Expanded focus on the lower divisions might serve to diminish the focus ...
participants than your classic job interview website (Leetcode). Expanded focus on the lower divisions might

Full text and comments »

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

75.
By alfadel, history, 7 years ago, In English
What is new in KONTESTS? Hello Codeforces, More than one year ago I started working on KONTESTS, a [Competitive Programming Contests Schedule](https://codeforces.me/blog/entry/60798). After that we published [KONTESTS browser extension](https://codeforces.me/blog/entry/63611) built on top of [KONTESTS APIs](https://kontests.net/api) which is available on [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/kontests) and [Google Chrome](https://chrome.google.com/webstore/detail/kontests/agpdemlkalmmeenclchlajdcmbcacoea) browsers. Now, after more than one year, [KONTESTS](https://kontests.net) supports more than 10 online judges: 1. [CodeForces](https://codeforces.com) 2. [CodeForces::Gym](https://codeforces.me/gyms) 3. [TopCoder](https://topcoder.com) 4. [AtCoder](https://atcoder.jp) 5. [CS Academy](https://csacademy.com) 6. [CodeChef](https://codechef.com) 7. [HackerRank](https://hackerrank.com) 8. [HackerEarth](https://www.hackerearth.com) 9. [Kich Start](https://codingcompetit...
) 10. [LeetCode](https://leetcode.com) 11. [A2OJ](https://a2oj.com)

Full text and comments »

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

76.
By jobin491, history, 19 months ago, In English
Help with a Leetcode problem [Problem](http://https://leetcode.com/problems/maximum-number-of-tasks-you-can-assign/description/) You have n tasks and m workers. Each task has a strength requirement stored in a 0-indexed integer array tasks, with the ith task requiring tasks[i] strength to complete. The strength of each worker is stored in a 0-indexed integer array workers, with the jth worker having workers[j] strength. Each worker can only be assigned to a single task and must have a strength greater than or equal to the task's strength requirement (i.e., workers[j] >= tasks[i]). Additionally, you have pills magical pills that will increase a worker's strength by strength. You can decide which workers receive the magical pills, however, you may only give each worker at most one magical pill. Given the 0-indexed integer arrays tasks and workers and the integers pills and strength, return the maximum number of tasks that can be completed. below is the code that i tried with a complexity of N(logN)(logN). N=...
Help with a Leetcode problem

Full text and comments »

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

77.
By ADJA, history, 7 years ago, In English
My new interview preparation website Hello, Codeforces Here is something I've been working on for a while now. It's still in beta, but I think it's in a good shape to share. I think it's relevant to CF community, but if not, sorry for the spam :) I am an ex-Google software engineer, and I wrote down almost everything I know about interview preparation, and launched a small website. It is something of a preparation course and guide at the same time. Here is what's inside: * 40+ articles about everything from resume to algorithms to compensation. * Selected leetcode problems with hints, solutions and such. * Code examples and explanations of common algorithms and techniques. * A place where you can track your interview preparation progress. Please take a look and let me know what you think. Hopefully, you will find it useful in your own preparation! **Link**: [https://interviews.school/](https://interviews.school/) P.S. I would appreciate any feedback. Feel free to point to any errors you will find. ...
* 40+ articles about everything from resume to algorithms to compensation. * Selectedleetcode

Full text and comments »

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

78.
By nisarg_0, history, 5 years ago, In English
Kontest-Reminder (A Dashboard for upcoming programming contests) As we know there are quite a lot of websites like Codechef, Codeforces and many more to practice Competitive Coding, sometimes Coders can’t keep a track of all the contests hosted by these websites and may miss a few. To avoid this we have built a Chrome Browser Extension named Kontest-Reminder, to never let any coder forget or miss any Coding contest. **Kontest-Reminder** supports the following websites: ~~~~~ 1. CodeChef 2. CodeForces 3. HackerEarth 4. HackerRank 5. TopCoder 6. AtCoder 7. Google KickStart 8. Leetcode ~~~~~ Users can Subscribe/Unsubscribe to any website for updates. Kontest-Reminder shows contests in 3 sections Ongoing Contests, Contests in 24 hours and Upcoming Contests. The dashboard provides a one-click solution to visit the Contest Page for more details and add the contest to the user’s **Google Calendar** beforehand. The most important feature of Kontest-Reminder is that it can also set an alarm i.e. if a user sets an alarm for a contest...
. Google KickStart 8. Leetcode ~~~~~

Full text and comments »

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

79.
By _Sparky_, history, 5 months ago, In English
Built a website that forces you to practice what you're actually bad at, not what's comfortable Hey guys, I want to share something I've been building. I'm a 2nd year student, and I practice on Codeforces, LeetCode, and CodeChef. For a while I kept running into the same annoying problem — my progress was scattered across three tabs, three different rating systems, three different "weak topics," and I had no single place to actually see how I was doing or what I should practice next. So over the past few months I built CPPro to fix that for myself, and figured some of you might find it useful too. **What it actually does** It's a single platform that pulls your CF + LC + CodeChef data together — ratings, heatmap, contest history, topic-wise solve counts. Nothing groundbreaking on its own, I know there are tools that already do parts of this. The part that's actually different from most trackers is the daily problem system. Instead of generic "problem of the day" picks, it looks at your actual solve history across all three platforms and gives you two problems every ...
I'm a 2nd year student, and I practice on Codeforces, LeetCode, and CodeChef. For a while I kept

Full text and comments »

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

80.
By tarunya.programmer, 10 months ago, In English
100 Problems, Countless Lessons: My Competitive Programming Journey So Far ## 100 Problems: A Small Personal Checkpoint Hey everyone, This is not a milestone post. It is more like a diary note. A few days ago, I noticed that I had crossed 100 solved problems on Codeforces. On Codeforces, that number is not impressive at all. Many people solve that much very quickly. But for me, it felt worth pausing for a moment. ===================================== ### Why This Matters To Me When I joined Codeforces four months ago, I was completely lost. I had: - zero competitive programming experience - a Python IDE - a cup of chai - and a lot of confusion Even opening a Div2 contest felt intimidating. Not because the problems were impossible, but because I did not know how to think in that environment. So this post is not about achievement. It is about acknowledging a small personal win: consistency. ===================================== ### What Changed In the beginning, everything felt overwhelming. - What is Div2? - ...
Source Contributor Contests: LeetCode, CodeChef, Codeforces, Newton Learning one problem at a time, At the same time, I was trying contests on different platforms: LeetCode weeklies, CodeChef

Full text and comments »

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

81.
By lil_chonk, history, 7 years ago, In English
Solve codeforces problems directly from VS Code. A VS Code extension. (vscode-codeforces) Hello codeforces, I would like to present to you a VS Code extension which lets you solve codeforces problems directly from VS code, no need of opening a browser. Inspired from this great extension https://github.com/jdneo/vscode-leetcode. <strong>UPDATE</strong> It's live here : https://marketplace.visualstudio.com/items?itemName=KaustubhSathe.vscode-codeforces ## Requirements - [VS Code](https://code.visualstudio.com/) - [Node.js](https://nodejs.org/en/) <hr/> ## Quick Start [![quickStart1.md.png](https://imagehost.imageupload.net/2020/05/29/quickStart1.md.png)](https://www.imageupload.net/image/51jLz) <hr/> ## Features **Sign In/Out** - Click on "Sign in to Codeforces" in the codeforces explorer to sign in with your codeforces account. - Or use the following command : - Codeforces : Sign In [![signinpic.png](https://imagehost.imageupload.net/2020/05/29/signinpic.png)](https://www.imageupload.net/image/51Reh) **Browse Problems** Browse p...
/jdneo/vscode-leetcode.

Full text and comments »

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

82.
By khaledghonem, 2 years ago, In English
Topic : Bit manipulation (Roadmap) <img alt="Logo" src="/predownloaded/63/91/6391eafacef8f14113ae3c6051c58402c1e369f2.png" style="width:35%; height: 35%; margin-left: 30%; margin-right: auto; max-width: 100.0%;max-height: 100.0%;" /> <br> In this blog, I will gather some study resources and problem sets to help you understand the topic of bit manipulation. I will provide explanatory videos (in Arabic) followed by easy and medium-level problem sets.<br> ### **<span style="color:#800080">Explanatory Videos</span>** ##### <span style="color:#800080">video 1</span> Watch [this](https://youtu.be/sK0uVbs_J6Y?si=wAr_tZvI06Z_LYDJ) YouTube video and Learn basic Bit operations. (made by [solver to be](https://solvertobe.com/))<br> ##### <span style="color:#800080">video 2</span> Watch [this](https://youtu.be/ldwGf-iVsdU?si=ZU-1pMVmmNBlRZwU) YouTube video and Learn more patterns and concepts. (made by [Dr. Mustafa Saad](https://t.me/mostvision)) <hr> ### **<span style="color:#800080">Problem Sets</span>** These probl...
##### **problem set 1 (LeetCode

Full text and comments »

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

83.
By agarwalkomalmay20, history, 4 years ago, In English
Leetcode Problems Solutions <p><a href="https://leetcodesol.com/leetcode-two-sum-problem-solution-in-c.html" target="_blank">Leetcode Two Sum Problem Solution&nbsp;in C</a></p><p><a href="https://leetcodesol.com/leetcode-two-sum-problem-solution-in-cpp.html" target="_blank">Leetcode Two Sum Problem Solution in C++</a></p><p><a href="https://leetcodesol.com/leetcode-two-sum-problem-solution-in-java-programming.html" target="_blank">Leetcode Two Sum Problem Solution in Java</a></p><p><a href="https://leetcodesol.com/leetcode-two-sum-problem-solution-in-python.html" target="_blank">Leetcode Two Sum Problem Solution in Python</a></p><p><a href="https://leetcodesol.com/leetcode-two-sum-problem-solution-in-c-sharp.html" target="_blank">Leetcode Two Sum Problem Solution in C#</a></p><p><a href="https://leetcodesol.com/leetcode-add-two-numbers-problem-solution-in-c.html" target="_blank">Leetcode Add Two Numbers Problem Solution in C</a></p><p><a href="https://leetcodesol.com/leetcode-add-two-numbers-problem-solution-in-c...
Leetcode Problems Solutions, Leetcode <https://leetcodesol.com/<B>leetcode</B>-first-missing-positive-problem-solution.html> , Leetcode <https://leetcodesol.com/<B>leetcode</B>-sqrt-x-problem-solution.html>

Full text and comments »

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

84.
By calmpsychopath, history, 3 years ago, In English
Number of Wonderful Substrings [a harder variation] Hey guys, I was trying to solve the question [1915. Number of Wonderful Substrings](https://leetcode.com/problems/number-of-wonderful-substrings/description/) on Leetcode. <spoiler summary = "Problem Statement"> A wonderful string is a string where **at most one** letter appears an **odd** number of times. - For example, "$ccjjc$" and "$abab$" are wonderful, but "$ab$" is not. Given a string $word$ that consists of the first ten lowercase English letters ('$a$' through '$j$'), return the number of wonderful non-empty substrings in $word$. If the same substring appears multiple times in $word$, then count each occurrence separately. A substring is a contiguous sequence of characters in a string. **Constraints**: - $1 \le word.length \le 10^{5}$ - $word$ consists of lowercase English letters from '$a$' to '$j$'. </spoiler> Pretty cool problem. Do give it a go before reading further! Now, I decided to make the problem a bit more challenging, by slightly changi...
~~~~~ class Solution { using i64, ://leetcode.com/problems/number-of-wonderful-substrings/description/) on Leetcode.

Full text and comments »

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

85.
By ClosetNarcissist, history, 3 years ago, In English
Longest Common Subsequence using bit operations? Recently i did Leetcode [Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence/description/) problem. I used the basic dp approach and solved it in 18 ms using 12 mb space. After that i decided to check the fastest solutions for the problem and got this code <spoiler summary="Fastest LCS code"> ~~~~~ class Solution { public: int longestCommonSubsequence(string X, string Y) { if ( X.size() < Y.size() ) swap(X,Y) ; int m = X.size() , n = Y.size(); if (m == 0 || n == 0) return 0; int w = (m + 31) >> 5; std::uint32_t S[256][w]; std::memset(S, 0, sizeof(std::uint32_t) * 256 * w); std::int32_t set = 1; for (int i = 0, j = 0; i < m; ++i) { S[X[i]][j] |= set; set <<= 1; if (!set) set++,j++; } std::uint32_t L[w]; std::memset(L, 0, sizeof(std::uint32_t) * w); for (int i = 0; i < n; ++i) { std::u...
Recently i did Leetcode [Longest Common Subsequence](https://leetcode.com/problems/longest-common

Full text and comments »

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

86.
By nonme, history, 3 years ago, In English
Find K Pairs with Smallest Sums with M pointers? Hello everyone! Today's LeetCode Daily problem is [Find K Pairs with Smallest Sums](https://leetcode.com/problems/find-k-pairs-with-smallest-sums/description/). <spoiler summary="Problem description"><pre>You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u, v) which consists of one element from the first array and one element from the second array. Return the k pairs (u1, v1), (u2, v2), ..., (uk, vk) with the smallest sums. Example 1: Input: nums1 = [1,7,11], nums2 = [2,4,6], k = 3 Output: [[1,2],[1,4],[1,6]] Explanation: The first 3 pairs are returned from the sequence: [1,2],[1,4],[1,6],[7,2],[7,4],[11,2],[7,6],[11,4],[11,6] Example 2: Input: nums1 = [1,1,2], nums2 = [1,2,3], k = 2 Output: [[1,1],[1,1]] Explanation: The first 2 pairs are returned from the sequence: [1,1],[1,1],[1,2],[2,1],[1,2],[2,2],[1,3],[1,3],[2,3] Example 3: Input: nums1 = [1,2], nums2 = [3], k = 3 Output: [[1,3],[2,3]] Explanat...
Hello everyone! Today's LeetCode Daily problem is [Find K Pairs with Smallest Sums](https

Full text and comments »

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

87.
By NonTourist, 5 months ago, In English
AlgoRadar: an explainable problem recommendation system for CP practice # AlgoRadar &mdash; an explainable recommender for CP practice Hello Codeforces! I built **AlgoRadar**, an open-source recommendation/analytics system for competitive programming practice. Repository: [Link](http://github.com/drawmebaaz/AlgoRadar) The goal is simple: > Given my public submission history, what should I practice next? The system uses Codeforces as the strongest source because it provides public submissions, verdicts, problem ratings, tags, rating history, and problemset metadata. It also has adapters for LeetCode and CodeChef, but Codeforces is the main difficulty anchor. --- ## 1. Main idea AlgoRadar converts public CP activity into explainable features and ranks unsolved problems by **learning value**, not just rating or popularity. Rough pipeline: ``` handle -> fetch public submissions/problem metadata -> build profile/tag/difficulty features -> classify focus areas -> estimate solve probability -> rank candidate problems -> buc...
, problem ratings, tags, rating history, and problemset metadata. It also has adapters forLeetCode, ``` public solved history is noisy tags are broad weights are heuristic CodeChef/LeetCode

Full text and comments »

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

88.
By DeltaPavonis, history, 4 years ago, In English
Making the shortest distance between two given nodes a certain number by modifying edge-weights In yesterday's [LeetCode Weekly Contest 346](https://leetcode.com/contest/weekly-contest-346/), nearly no contestant solved the 4th problem successfully. Here is the problem, [Modify Graph Edge Weights](https://leetcode.com/problems/modify-graph-edge-weights/description/): Given an **undirected, weighted, connected** graph with `n` nodes ($1 <= n <= 100$) and `m` edges ($1 <= m <= \frac{n(n + 1)}{2}$). All edges have weight in $[1, 10^{7}]$, but some have weight $-1$, denoting that **you are to assign that edge some positive weight in** $[1, 2 * 10^{9}]$. Now, you are also given two nodes `source` and `destination`, as well as a positive integer `target` ($1 <= target <= 10^{9}$). **Find ANY assignment of edge weights that make the shortest distance from `source` to `destination` exactly `target`**, or report that there is no such assignment. **My own idea:** - Firstly, if the shortest distance from `source` to `destination` is less than `target` without considering any cus...
In yesterday's [LeetCode Weekly Contest 346](https://leetcode.com/contest/weekly-contest-346

Full text and comments »

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

89.
By snowysecret, history, 14 months ago, In English
Suggest ideas for my YouTube channel! Dear CF community, I am writing to share that my [YouTube channel](https://www.youtube.com/@snowysecrettt/featured) has recently reached 100 subscribers! In my channel, I post CP content (mainly contest screencasts) and occasionally problem explanations for other contests. You can check [my latest video](https://www.youtube.com/watch?v=FboV2Tt0y2Q) about the solution to today's Div. 3 Problem G. Recently, I also did [a few videos](https://www.youtube.com/watch?v=G529EDuXuYo&list=PLI1kLnjg_F_dbnqnmHaxoLKcrnL84FXTy) explaining some LeetCode questions. It's a pretty small channel for now, and I've only done a few videos with voiceover &mdash; but I'm eager to continue posting screencasts and solution explanations, as well as exploring new possibilities with this channel. Please let me know what you would like to see in future videos! For instance, feel free to suggest a type of content that you are interested in (not limited to CP!), or you can also give me the link to some C...
=G529EDuXuYo&list=PLI1kLnjg_F_dbnqnmHaxoLKcrnL84FXTy) explaining some LeetCode questions.

Full text and comments »

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

90.
By highonjuice, history, 4 years ago, In English
Ah crap, looks like I've become Expert lol ![ ](/predownloaded/85/a8/85a80f82afff1ea489158bdb3e3bf40b86df6be2.png) (This blog post is an update on my competitive programming journey, and hopefully serves as inspiration to others who enjoy programming as well) It's summer in the states, and I'm back on the grind. Although I'm now a rising high school senior. I still like grinding competitive programming and learning new algorithms. Although I've been through ups and downs, I'm back! And for the first time in a while, without nagging teachers telling me to turn in assignments on time, or friends trying to ask me for answers, I've felt like I can chill this summer and do some codeforces. Oddly enough, I started competing in every contest I know. [I made a leetcode account, and started competing there.](https://leetcode.com/back2sqr1/) ![ ](/predownloaded/50/b8/50b8206f93e77ac64eebb955d7669fa71b4d7858.png) (I've only done 3 contests, 2 weekly and 1 biweekly) &mdash; and it didn't show up at the time I've written th...
[I made a leetcode account, and started competing there.](https://leetcode.com/back2sqr1

Full text and comments »

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

91.
By mdshahriaswapno, history, 4 months ago, In English
Never Miss a Contest Again! Contest Alarm App for Android Hello Codeforces community! How many times have you missed an upcoming **Codeforces Round (Div. 2 / Div. 3 / Educational)** or an **AtCoder Beginner Contest** simply because you forgot the start time or got confused with time zone conversions? As competitive programmers, we participate in contests across multiple platforms like Codeforces, AtCoder, CodeChef, and LeetCode. Managing alarms manually for every single contest can be annoying and easy to forget. To solve this, I built **Contest Alarm App** — a free, open-source, local-first Android app designed specifically for competitive programmers! --- ### Key Features - **Multi-Platform Auto-Sync**: Automatically fetches live contest schedules from Codeforces, AtCoder, CodeChef, LeetCode, Clist and more. - **Division-Wise Auto-Alarms**: Set automatic alarms for your preferred divisions (Div 1, Div 2, Div 3, Div 4, Educational, ABC, ARC, Starters) as soon as new contests appear. - **Auto-Reschedule on Time Changes**: ...
, AtCoder, CodeChef, and LeetCode. Managing alarms manually for every single contest can be annoying

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

92.
By reporting_cheaters, history, 7 years ago, In English
Reporting cheaters and more Hello everyone. I reported some cheaters in more than one occasion to **[user:MikeMirzayanov,2020-04-05]** and other people via direct message and nothing happened... they just ignored me. It is very frustating that Codeforces is not emphasizing the justice and fairness of contests as other pages. Leetcode for example has a _Report Cheating_ button if you click any source code. Why don't we have that? **Here there is no easy way to report cheaters**, and if you do it seems like nothing will happen. Do I really have to create a fake account and post a blog in order for someone to even notice? And just because I hate cheaters I'll share with you some obvious cheaters I already reported several times and keep cheating ... Global Round 7, exact same code, just changed indentation: https://codeforces.me/contest/1326/submission/73717381 https://codeforces.me/contest/1326/submission/73714727 Educational Codeforces Round 84, exact same code, they just changed ONE variable name: ...
. Leetcode for example has a _Report Cheating_ button if you click any source code. Why don't we have

Full text and comments »

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

93.
By sickboydroid, history, 5 months ago, In English
Prefix Sum of Prefix Sum Recently, I was doing a LeetCode problem (I know, I know what you are thinking ;(, it was [LC 2281: Sum of Total Strength of Wizards](https://leetcode.com/problems/sum-of-total-strength-of-wizards/description/)), and I stumbled upon a subproblem that I found genuinely interesting. The problem basically boiled down to this: **You are given $q$ queries, each with an $L$ and $R$. For each query, you need to find the sum of all subarrays entirely contained within the range $[L, R]$, and you have to answer each query efficiently.** If we write it out as a brute force, it's just three nasty nested `for` loops: $$q(L, R) = \sum_{i=L}^{R} \sum_{j=i}^{R} \sum_{k=i}^{j} a_k$$ Say you only had to find $\sum_{i=L}^{R} a_i$. This is easy with standard prefix sum array. You just define $P[x] = \sum_{i=0}^{x-1} a_i$, which answer the queries in $O(1)$ time: $P[R+1] - P[L]$. But what do we do when we have multiple summations? Can we still answer this in $O(1)$? *Spoiler: Yes. We just nee...
Recently, I was doing a LeetCode problem (I know, I know what you are thinking ;(, it was [LC 2281

Full text and comments »

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

94.
By Symmetry9, history, 17 months ago, In English
AlgoGym – A Training Gym for Codeforces + LeetCode Practice Hello everyone, I hope you all are doing well. Recently, many of us noticed that **ThemeCP** is currently offline. For a long time, it had been a helpful tool for virtual training and problem filtering, especially for Codeforces users. Its absence created a significant gap in daily practice routines. To help with that, I’ve created a new platform called [AlgoGym](https://algogym.vercel.app/). **What is AlgoGym?** AlgoGym is a virtual training platform designed to support consistent problem-solving practice. It currently contains a growing collection of 12,600+ problems from both Codeforces and LeetCode, all organized with useful filters for efficient searching and practice. **The main feature of this platform is the Training Gym, where you can:** Select levels based on a well-structured [sheet](https://docs.google.com/spreadsheets/d/1gdD-syEpfy10Vz1f5UAm5eKiV_UAEdG-C4jrouN57bs/edit?gid=1667320122#gid=1667320122) (more details of sheet is in this[ blog](https://codef...
AlgoGym – A Training Gym for Codeforces + LeetCode Practice, Codeforces and LeetCode, all organized with useful filters for efficient searching and practice., Platform filter (Codeforces or LeetCode)

Full text and comments »

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

95.
By ritesh17rb, history, 2 years ago, In English
C++ STL Quick Help Repo: https://github.com/MAZHARMIK/Cpp-STL-Quick-Help/blob/main/README.md ![ ](/predownloaded/c9/46/c946ccb6db68d2e31777d6f019252eb0b4a9d655.png) Repo: https://github.com/MAZHARMIK/Cpp-STL-Quick-Help/blob/main/README.md Welcome to a quick reference guide for essential C++ Standard Template Library (STL) functions. These functions, with easy-to-understand comments and examples, are especially helpful for solving various LeetCode problems. Let’s dive in! Priority Queues Usage of priority_queue (heap): Max-Heap: priority_queue<int> pq; Min-Heap using in-built comparator: priority_queue<int, vector<int>, greater<int>> pq; Custom Comparator (Structure): struct comp { bool operator()(int &a, int &b) { return a < b; // max-heap } }; priority_queue<int, vector<int>, comp> pq; Lambda Function Comparator: auto comp = [](int &a, int &b) { return a < b; // max-heap }; priority_queue<int, vector<int>, decltype(comp)> pq(co...
various LeetCode problems. Let’s dive in!

Full text and comments »

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

96.
By nehl, 5 months ago, In English
I got tired of forgetting who my friends were on CF, so I built a tool to fix it. Hey Codeforces, A few months ago, I realised I had a really annoying problem. I was scrolling through the standings after a round, trying to see how my batchmates and a few seniors did, and I completely blanked on half their handles. Between keeping track of college friends, study groups, and a few friendly rivals across CF, AtCoder, and LeetCode, it was getting impossible to remember who was _xX_dragon_slayer_99_Xx_ and who was _math_wizard_007_. I was basically keeping a mental spreadsheet just to figure out who to discuss problems with. I couldn't find a good existing solution, so I decided to just build one for myself. It’s a Chrome extension called **Constellation**. Initially, I just built it to do one thing: swap out cryptic handles with real names right on the page. But as I kept using it, I kept adding little features that I found myself wishing I had during my own contest prep. I’ve been using it for a while now, and it’s honestly been such a massive quality-of...
, AtCoder, LeetCode, and HackerRank handles together, group them into custom lists (like "Seniors" or, , AtCoder, and LeetCode, it was getting impossible to remember who was _xX_dragon_slayer_99_Xx_ and who was

Full text and comments »

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

97.
By anshu2002, history, 3 years ago, In English
Why my friend's solution worked but mine not ? for this [leetcode problem](http://https://leetcode.com/problems/maximum-profit-in-job-scheduling/) this is my solution which gave tle ~~~~~ class Solution { public: vector<vector<int>>dp; int solve(int i,vector<vector<int>>&ne,int prev){ if(i==ne.size()){ return 0; } if(prev!=-1 && dp[i][prev]!=-1) return dp[i][prev]; int ans = INT_MIN; ans = max(ans,solve(i+1,ne,prev)); if(prev==-1||ne[prev][1]<=ne[i][0]) ans = max(ans,solve(i+1,ne,i)+ne[i][2]); if(prev!=-1) dp[i][prev]=ans; return ans; } int jobScheduling(vector<int>& startTime, vector<int>& endTime, vector<int>& profit) { dp = vector<vector<int>>(profit.size(),vector<int>(profit.size(),-1)); vector<vector<int>>ne; for(int i=0;i<profit.size();i++){ ne.push_back({startTime[i],endTime[i],profit[i]}); } sort(begin(ne),end(ne));...
for this [leetcode problem](http://https://leetcode.com/problems/maximum-profit-in-job-scheduling/)

Full text and comments »

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

98.
By Roshan_Vijey, history, 2 years ago, In English
Struggling with Solving C Problem (Div 2) Hi everyone, I'm currently trying to improve my competitive programming skills and would appreciate some guidance. Here's a summary of my situation: **Current Progress:** - I solved more than 150 problems in Leetcode and very familiar with data structure and algorithms (In Leetcode Weekly contest, I can easily solve 3 problems out of 4). - I regularly participate in Codeforces contests. - Typically, I can solve the first two problems. But sometimes I also struggle with B problem (when I sees like problem was a new pattern to me). - But, I consistently struggle with the C problem. **My Approach:** - During the contest, I attempt to solve the 3rd problem but often fail to come up with the optimal solution. - After the contest, I read the editorial to understand the correct approach. - I notice that the main reason I fail is because I encounter new pattern types of problems that I haven't seen before. - (Ex: In a question, I come up with one scenario where brute force...
- I solved more than 150 problems in Leetcode and very familiar with data structure and algorithms

Full text and comments »

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

99.
By nileq, history, 18 months ago, In Russian
Мой путь до 1600 рейтинга... Привет, codeforces! ================== Я начинаю свой путь по спортивному программированию до 1600 рейтинга. В период этого времени я не буду участвовать в любых соревнованиях, только теория и практика. Ежедневно я буду выкладывать свой прогресс сюда &mdash; что изучил, что знал до этого, поэтому если интересно следите. _(P.S Если вы опытнее меня в спортивном программировании &mdash; буду рад любой помощи, совету или рекомендации. Можете подсказать интересные задачи, что можно изменить в плане по изучению и так далее. Ваш опыт для меня очень важен, особенно в начале пути.)_ Также не забудьте посмотреть прогресс моего друга [user:autaons,2025-06-15]! ---------------------------------------------------- **План по изучению** __2-я неделя:__ - 2 дня: подтянуть базовые техники: • бинарный поиск по ответу • два указателя • хэш-таблицы • повторить C++ __3-я неделя:__ - 1-2 дня: работа с мышлением • Комбинатор...
(Наидлиннейший k-хороший подотрезок, сотовая связь..) и Leetcode (типовые задачи на два указателя) - В

Full text and comments »

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

100.
By sidkid, history, 3 months ago, In English
Edit: Sorry for Alleging FALSE POSITIVE Edit: Sorry For Alleging False Positive, Had used AI for debugging and formatting, got caught by the `treasure_map_fin` W for writers for setting up the trap; Sorry for violating the code of conduct. Promise not to use AI even for debugging and formatting in further contest if given a second chance . FALSE POSITIVE HELP NEEDED — MY RECENT DIV. 3 CONTEST SUBMISSION GOT SKIPPED [user:nik_exists,2026-09-06] [user:cry,2026-09-06] [user:KAN,2026-09-06] [user:MikeMirzayanov,2026-09-06] There was this message after the contest: sidkid Your submissions in contest 2259 &mdash; Codeforces Round 1119 (Div. 3) were skipped because of a rules violation. I honestly don't know what exactly happened and why my submissions got skipped. I am making this blog because I genuinely believe this is a false positive and I would really appreciate if someone can look into this once. I have been doing DSA for around 1 year now and have been regularly participating in Codeforces con...
contests. Along with Codeforces, I have also been consistently solving problems onLeetCode. I have, LeetCode: https://leetcode.com/u/siddkid/, My LeetCode profile: https://leetcode.com/u/siddkid/

Full text and comments »

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

101.
By Sal3h.Sa3d, history, 3 years ago, In English
Exploring Dynamic Programming: A Comprehensive Guide Hey Codeforces community! Today, let's dive deep into the fascinating world of Dynamic Programming (DP). Whether you're a beginner looking to grasp the basics or an experienced coder seeking advanced techniques, this guide aims to provide a comprehensive overview of DP concepts and applications. **What is Dynamic Programming?** Dynamic Programming is a powerful algorithmic technique used to solve problems by breaking them down into simpler subproblems and storing the solutions to these subproblems to avoid redundant calculations. It's particularly useful for optimization problems where we seek to maximize or minimize certain criteria. **Basic Concepts** 1. Memoization vs. Tabulation: Discuss the two main approaches to implementing DP &mdash; memoization (top-down) and tabulation (bottom-up) 2.State Definition: Explain what a "state" means in DP and how to define it based on the problem's constraints. 3. Transition Function: Illustrate how to derive the transition fu...
found, such as AtCoder, LeetCode, and HackerRank.

Full text and comments »

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

102.
By smile_users, history, 2 days ago, In English
I Built a Chrome Extension to Improve My DSA Revision – Should I Build One for Codeforces Too? 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](/predownloaded/90/b4/90b45ce1456d7bca87f76c3d63e858941407b9ee.png) The extension follows a simple spaced-repetition schedule: - *...
Currently, LeetRepeat is designed for LeetCode.

Full text and comments »

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

103.
By bonessonlyyy, history, 18 months ago, In English
The Hidden Inequality in Competitive Programming The Hidden Inequality in Competitive Programming: Why CP Is Not Global Yet Competitive Programming (CP) is often celebrated as a meritocratic, borderless arena where anyone with a laptop and an internet connection can rise to the top. But beneath the surface, there’s a reality we rarely discuss: **CP is not a level playing field, and it’s far from truly global.** Awareness: The First Barrier In some countries—Russia, China, Poland, and a handful of others—CP is a well-known, even prestigious pursuit. Students are introduced to Olympiad math and programming early, and there are established school clubs, training camps, and experienced mentors. By university, many have years of CP exposure. But for most of the world, CP is invisible: - It’s not taught in schools. - There are no local contests, clubs, or teachers. - Most students discover CP by accident, often late—maybe while prepping for interviews or stumbling on a YouTube video. Result: Many talented minds never ...
Meanwhile, platforms like LeetCode and HackerRank offer friendlier UIs, gamification, and guided

Full text and comments »

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

104.
By mouse_wireless, history, 5 years ago, In English
Is there a better than quadratic-time solution for "string dictionary with wildcards" problem? Hello codeforces, Long time no see. I'm having a look at [problem #211 on leetcode](https://leetcode.com/problems/design-add-and-search-words-data-structure/). It's a classic problem: you add strings to a collection, and you have queries which ask if a string is part of the collection, _except_ the query strings can contain wildcards, which can match any character. The recommended solution is a trie-based one, in which if you encounter a wildcard, you try to continue the query from each of the current node's children (similar to a normal graph traversal). The problem with this solution, is that it has a worst case complexity of $O(Q * N * L)$, where Q is the number of search queries, N is the number of added strings, and L is the maximum length of the string. This is achieved when there are N "different enough" strings (randomly generated will do) of max length, and Q queries of L wildcards (to avoid premature termination of the traversal, you can also force the final chara...
I've run a _lot_ of solutions I found on leetcode against this test case (code below).

Full text and comments »

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

105.
By Vinayak7989, history, 5 years ago, In English
DP Also in most the dp problems after reading the statement you're like how would I know what will be the best way so definitely we have to try everything but in a smarter way that's nothing by dp. and also low constraints is another big hint. so first step to see understand the question clearly and see how the process would look like means imagine any general scenario then let's assume we know the optimal way and see how any general ans would look like (means maybe we have to choose some indices or whatever) Then maybe analyzing the PROPERTIES of general ans would help (like you can make some easy observation that length can't be too large there can't be two even no. or any sort of observation) and then many time it turns out that the general structure of our ans is not too typical and we can maybe brute force or Binary search means the problems becomes approachable after that and we'll definitely get to the final solution after this. so the main part is to see the general an...
Now what makes the difference in Leetcode and CF DP problem is that.. in leetcode constraints are

Full text and comments »

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

106.
By Prakharg_8651, history, 12 months ago, In English
Word Ladder: For 1e5 Queries on a Static Dictionary # Word Ladder With 1e5 Queries — Efficient Approaches and Analysis Hello , During learning graphs, I encountered a famous and classic problem *Word Ladder* problem. Given a beginWord and endWord, find the minimum number of single-character transformations, where each intermediate word must be from a given list. Given all words are of the same length. This shows up on LeetCode, GFG, interviews, everywhere. But almost every version of the problem is single-query. You solve it once and move on. Now I want to discuss for a scenario where the dictionary is fixed and you need to answer queries in range of **1e5**. **N ≤ 5000 words** **L ≤ 10 (word length)** **Q ≤ 100000 queries** This completely changes the problem. The typical BFS solution (where we generate neighbours (26\*L) at each stage and check whether they are in the dictionary or not and proceed) became far too slow. This article explores that space in depth and shows efficient techniques dependin...
This shows up on LeetCode, GFG, interviews, everywhere.

Full text and comments »

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

107.
By kutkrr, 7 months ago, In English
ThemeCP-LeetCode: ThemeCP-style practice for LeetCode <b style="color:black;">Theme</b><b style="color:red;">CP</b> is really popular among Codeforces users, and personally it was extremely effective for me. If you don't know what <b style="color:black;">Theme</b><b style="color:red;">CP</b> is, please read this post: https://codeforces.me/blog/entry/136704 The ThemeCP way of practicing worked really well in my case. I managed to go from 1228 → 1557 in around 3–4 months of rigorous practice (although my current rating is not that great due to lack of practice :)). But later, for company online assessments and interviews, I started practicing LeetCode problems. But on LeetCode, although we get a contest rating, we can’t really practice around our actual skill level because problems are only tagged as Easy / Medium / Hard. So I wanted a ThemeCP-like experience for LeetCode. Initially, I used [ZeroTrac](https://zerotrac.github.io/leetcode_problem_rating/#/) ratings, manually filtered problems, wrote them into a Google Sheet,...
ThemeCP-LeetCode: ThemeCP-style practice for LeetCode, practicing LeetCode problems. But on LeetCode, although we get a contest rating, we can’t really, But later, for company online assessments and interviews, I started practicing LeetCode problems, It works very similarly to ThemeCP, but for LeetCode practice., So I wanted a ThemeCP-like experience for LeetCode.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

108.
By quollcucumber1, history, 5 months ago, In English
Have you ever wanted to have the codeforces style activity graph, but across other platforms? I have. <h4> This Project was fully vibe-coded, I just wanted this graph, and I thought many other people would also. </h4> https://github.com/quollcucumber/fullgraph/tree/main What this does, is it displays a graph of how much you've been training over the last year. It combines many different platforms. Mainly: - Codeforces - Atcoder - DMOJ - OJ.US - Leetcode - Orac2.info (niche Australian OI training) To use this tool, simply replace the usernames at the bottom with your own. (lines 288 &mdash; 293). Say your handle was tourist, you would replace it with: ```python "cf": "tourist", "atcoder": "tourist", "dmoj": "tourist", "ojuz": "tourist", "leetcode": "", "orac": False ``` If you don't have a specific account on one of these, simply leave it blank. To run it, download the appropriate python files with ``` pip install matplotlib numpy pandas requests seaborn beautifulsoup4 ``` And then simply run the file, and it should display...
", "leetcode": "", "orac": False ```, - Leetcode

Full text and comments »

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

109.
By SnowLucario_Z, history, 4 years ago, In English
A Recap of My First Year in CodeForces Hello all on Codeforces! ------------------ It’s been just over a full year since I created my Codeforces account. Since then a lot has happened on my Codeforces journey so far. With everything that’s happened I want to look back at how I got to my current point, share what I learned in the process, recap some of my best moments, and laugh at whatever I was thinking on a few of these contests, because a lot happened. The only issue is that there’s no way I’m going to detail all **60** contests I took part in 2022. Instead I’ve chosen to “award” the 9 most memorable contests, wheter it be because I did exceedingly well or self destructed in almost hilarious fashion. A few notes before I begin: No full solutions for any problems are shown in this post but there are code snippets and discussions that are spoilers for these problems. I apologize in advance. ### First Contest &mdash; [Hello 2022](https://codeforces.me/contest/1621) This was the first contest held in 2022, ...
from external [Leetcode](https://leetcode.com/study-plan/data-structure/) practice (I used the Data

Full text and comments »

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

110.
By priyanshu-panwar, history, 6 years ago, In English
CodeNation Intern Hiring 2021 Program Questions Yesterday, there was a CodeNation Intern Hiring Test that got failed due to Hackerrank server down problem. But the questions are available, I snapped them in the mean time. If someone can please solve them: **QUESTION &mdash; 1 Beautiful Tree** You are given a tree, rooted at 1, with N vertices (indexed from 1 to N). Each vertex has a value associated with it. The value of ith vertex is a[i]. Consider f[i] as the a[i]th beautiful number. A beautiful number is a positive number, whose sum of the square of its digits is less than or equal to X. You have to process M queries, where each query can be : **Query 1**- 1iy-Update a[i] = y. **Query 2**- 2i &mdash; Output the sum of for all the nodes in the sub-tree of node i (including node i), since the output can be very large, answer it modulo 998244353 **Input/Output Format** Input The first line contains N, M, and X, where N is the number of vertices, and M is the number of queries and X is the upper limit to check for a beau...
For better visualisation of questions, I have posted article on LeetCode with better indentation

Full text and comments »

111.
By vok8, history, 7 years ago, In English
Huge "Running Time" Difference in Identical Codes (LeetCode Online Judge) - Problem: [Pseudo-Palindromic Paths in a Binary Tree](https://leetcode.com/problems/pseudo-palindromic-paths-in-a-binary-tree/) --- - _Submission-1_: `(AC - 856 ms)` ![ ](/predownloaded/8b/12/8b1254a23409f04224a0f03e2e6211de3325e66e.png) --- - _Submission-2_: `(AC - 1824 ms)` ![ ](/predownloaded/e9/8b/e98b5d0b1d3168d3ab1e93757d80d344bea2b7e7.png) --- <spoiler summary="The Code"> ~~~~~ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {} * }; */ class Solution { public: vector<int> graph[100010]; int vall[100010]; // memset(vall,0,sizeof(vall)); int node=1; void run(TreeNode* root) { if(root==NULL) return; int...
Huge "Running Time" Difference in Identical Codes (LeetCode Online Judge)

Full text and comments »

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

112.
By yevhenii_kanivets, history, 7 years ago, In English
Codeforces WatchR 1.5.5: Contests++ Thanks to the latest migration to **Kotlin Multiplatform**, [Android app](https://play.google.com/store/apps/details?id=com.bogdan.codeforceswatcher) is now again ahead of [iOS one](https://apps.apple.com/us/app/codeforces-watchr-contests/id1495591299). The latter will be shortly completed and both apps will finally have the same functionality. ![ ](/predownloaded/b3/de/b3deadd4f35989a9ab5a8e3cc4424c41fe2b7e92.png) You can download latest [Android app](https://play.google.com/store/apps/details?id=com.bogdan.codeforceswatcher) and [iOS app](https://apps.apple.com/us/app/codeforces-watchr-contests/id1495591299) right from the mobile app stores. We have almost 2K of active users on both platforms right now! Thank you all for the trust! As a reminder, Contests tab now includes upcoming contests for **all major competitive programming platforms**: - Codeforces - TopCoder - AtCoder - CS Academy - CodeChef - HackerRank - HackerEarth - Kick Start - LeetCode As a BONUS,...
Start - LeetCode

Full text and comments »

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

113.
By yevhenii_kanivets, history, 7 years ago, In English
Codeforces WatchR: Contests++ Have you ever felt like there are **not enough contests** on Codeforces? Nothing to do this weekend? Well, then go to **App Store** and download [Codeforces WatchR](https://apps.apple.com/us/app/codeforces-watchr-contests/id1495591299). ![ ](/predownloaded/71/93/71931337323b28be9fedefca5e930b49b141de9b.png) There you will find upcoming contests for **all major competitive programming platforms**: - Codeforces - TopCoder - AtCoder - CS Academy - CodeChef - HackerRank - HackerEarth - Kick Start - LeetCode This wouldn't be possible without **great open-source project** &mdash; [KONTESTS](https://www.kontests.net), which gave us super-easy access to compiled list of all those contests. **Big thanks to all of you guys: Ali H. Fadel, Ridah O. Labbar, Ibraheem Z. Tuffaha.** Give them some love by starring official [GitHub repo](https://github.com/AliOsm/kontests) ;) This feature is currently available in [iOS app](https://apps.apple.com/us/app/codeforces-watchr-contes...
Start - LeetCode

Full text and comments »

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

114.
By Mohammed-Shoaib, history, 7 years ago, In English
Question: Weird behaviour with max in C++ I was trying out a problem (irrelevant) on [LeetCode](https://leetcode.com/) &mdash; [1372. Longest ZigZag Path in a Binary Tree](https://leetcode.com/problems/longest-zigzag-path-in-a-binary-tree/). I posted this question on the [forum](https://leetcode.com/discuss/general-discussion/534923/Weird-behaviour-with-max-in-C%2B%2B) but got no reply. Hence, I am asking the same question here. I noticed some weird behaviour when using the [max](https://en.cppreference.com/w/cpp/algorithm/max) function. I took a max in two ways: **Solution 1:** `max(1 + a, 1 + b)` **Solution 2:** `1 + max(a, b)` Both of these do exactly the same task of getting the `1 + max`. However: * [Solution 1](https://hastebin.com/ovefojuqos.cpp): &mdash; <font color="red">Runtime Error!</font> * [Solution 2](https://hastebin.com/sakubolisu.cpp): &mdash; <font color="green">Accepted</font> The full code is also given below: <spoiler summary="Solution 1"> ~~~~~ class Solution { public: int l...
I was trying out a problem (irrelevant) on [LeetCode](https://leetcode.com/) — [1372. Longest

Full text and comments »

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

115.
By AmanRaushan, history, 2 years ago, In English
How to solve this problem? i found this problem on leetcode discussion but not able to solve how to solve this can someone share some idea. [link](https://leetcode.com/discuss/interview-question/algorithms/6056172/TikTok-AMS-Grad-Assessment-2025-Start-16-21-Nov-(Generic)/) [link](https://www.reddit.com/r/leetcode/comments/1gtwybc/tiktok_oa_help/?rdt=42089) MAXIMIZE THROUGHPUT In ByteDance's vast network of data centers, millions of interconnected servers process content requests, handle user interactions, and deliver data to users globally. Each server is part of a dynamic task execution flow, represented by an array serverTasks, where each entry in the array indicates the next server in the chain that will handle a task. PROBLEM DESCRIPTION Optimizing the data pipeline requires careful management of these task handoffs. Once a task is picked up by server i, it triggers a dependency on server serverTasks[i], transferring the load there. However, this data transfer disables both servers i ...
[link](https://www.reddit.com/r/leetcode /comments/1gtwybc/tiktok_oa_help/?rdt=42089)

Full text and comments »

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

116.
By mohitranjan480, history, 19 months ago, In English
One-piece Themed Coding Contest Idea Calling All Codeforces Contest Organizers: Host a One Piece-Themed Coding Contest! Attention, competitive programmers and One Piece fans! Wouldn’t it be amazing to see a Codeforces (or any coding platform) contest where every problem is inspired by the world of One Piece? If you’re a contest organizer, problem setter, or just a fan who wants to make this happen, here’s a ready-made idea for an epic One Piece-themed coding round! Contest Concept: "Grand Coding Pirates" A competitive programming contest where: Problems are based on One Piece characters, abilities, and story arcs. Difficulty ranges from Easy (East Blue) to Hard (New World). Fun, engaging, and great for learning algorithms! Suggested Problem Ideas 1. "Luffy’s Gomu Gomu no Binary Search" (Easy) Task: Given a sorted list of Devil Fruit powers, find if a certain power exists (Binary Search). Why? Luffy’s stretching ability is like expanding the search range! 2. "Zoro’s Three-Sword Shortest Path" (Medium...
Spread the Word! Tag coding communities (Codeforces, LeetCode, CP Discord servers). Upvote on

Full text and comments »

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

117.
By jamesperaltaSWE, history, 11 months ago, In English
Establishing a Baseline This is the first entry in a series I’m calling ***Chasing Expert***. In this series, I will document my journey from **Codeforces Newbie → Codeforces Expert (1600+)**, and from Top 18% on LeetCode to earning the **Guardian badge (Top 2.5%)**. This will be my brain dump of what works, what doesn’t, and what deliberate practice really looks like. --- ## My Why For the past few years, I’ve been “good” at algorithms. - I have a **computer science degree** - I did well in **theoretical CS courses** - I’ve solved **700+ LeetCode problems** - I’ve gotten **FAANG offers** by passing LeetCode-style interviews But I don’t want to be good &mdash; I want to be **great**. I truly believe competitive programming–style questions like LeetCode and Codeforces force you to think deeper and faster. They force you to work on hard problems. They force you to do something so difficult that it **permanently changes the way you think**. So I decided to take the next step. ...
**700+ LeetCode problems** - I’ve gotten **FAANG offers** by passing LeetCode -style interviews

Full text and comments »

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

118.
By codetree_official, history, 21 month(s) ago, In English
Gap Check: Free Adaptive Coding Skill Diagnostic Tool Hey Codeforces! We're Codetree &mdash; a bunch of competitive programmers and former IOI/ICPC medalists who grew up grinding contests right here. This community shaped us, and now we want to give something back. **We've all seen the struggle:** - Grinding CF for interview prep but stuck at Grey/Green/Cyan despite putting in hours - Can't seem to break out of DIV 3/4 contests - No idea if you're actually getting better or just spinning wheels - Watching others climb while you feel stuck Been there. It sucks. So we built something we wish we had years ago: Gap Check &mdash; a **completely free** tool that exposes the difference between what you think you know and what you actually know. **How it works:** 1. Choose your starting point: - Just jump right in! - Pick an algorithm tag you're studying - Link a Leetcode problem you've been working on - The Codeforces problem linking feature is currently under maintenance. 2. Our adaptive testing ...
studying - Link a Leetcode problem you've been working on - The Codeforces problem linking

Full text and comments »

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

119.
By SaddisticDude, history, 4 years ago, In English
Minimum cost to reach a node in a graph with edge discounting Hi I came across this problem which I later found exactly on leetcode, A series of highways connect n cities numbered from 0 to n &mdash; 1. You are given a 2D integer array highways where highways[i] = [city1i, city2i, tolli] indicates that there is a highway that connects city1i and city2i, allowing a car to go from city1i to city2i and vice versa for a cost of tolli. You are also given an integer discounts which represents the number of discounts you have. You can use a discount to travel across the ith highway for a cost of tolli / 2 (integer division). Each discount may only be used once, and you can only use at most one discount per highway. Return the minimum total cost to go from city 0 to city n &mdash; 1, or -1 if it is not possible to go from city 0 to city n &mdash; 1 You can find more explanation here [here](https://leetcode.com/problems/minimum-cost-to-reach-city-with-discounts/) I know this can be solved by using Djikstra but I was curious whether it can b...
Hi I came across this problem which I later found exactly on leetcode,

Full text and comments »

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

120.
By likespro, history, 20 months ago, translation, In English
HORSE PROJECT: Токенизированный интеллектуальный ресурс HORSE PROJECT: Токенизированный интеллектуальный ресурс ------------------------------------------------------- Украинская версия доступна здесь: https://telegra.ph/HORSE-PROJECT-Token%D1%96zovanij-%D1%96ntelektualnij-resurs-04-12 Привет от команды **«unlimited_excellence»** в составе: - Андрей Михалко ([user:likespro,2025-04-12]) - Денис Орышич ([user:oryshych.d,2025-04-12]) - Назар Рак ([user:nazik_rachok,2025-04-12]) - Алексей Бондаренко ([user:AlexJenious,2025-04-12]) - Виктор Добош ([user:mr.grory,2025-04-12]) - Констянтин Чуев ([user:LaGipeR,2025-04-12]) - Иван Шнейдер ([user:kx04,2025-04-12]) - Георгий Михалко ([user:shad0w_,2025-04-12]) - Сергей Орышич ([user:Oryshych,2025-04-12]) Мы убеждены, что интеллектуальный труд имеет ценность, именно поэтому мы создали **HORSE Token** — инструмент для токенизации усилий в мире спортивного программирования, математики и обучения. Идея проекта и первая версия ---------------------------- **HORSE** — это децентрализов...
- **Expand** to other platforms (AtCoder, LeetCode, etc.), - Implement a **DAO** for community, - **Расширение** на другие платформы (AtCoder, LeetCode и т.д.), - **DAO** для управления

Full text and comments »

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

121.
By risumi, history, 8 months ago, In English
Seeking Help with TLE on Leetcode Hard Problem: Maximum Value of Concatenated Binary Segments Hi, recently I have attempted Leetcode Hard problem [3897. Maximum Value of Concatenated Binary Segments](https://leetcode.com/problems/maximum-value-of-concatenated-binary-segments/description/). After working on it for some time, I came up with a solution, but I ran into a Time Limit Exceeded (TLE) error on a specific test case. Problem Overview ================== You are given two integer arrays nums1 and nums0, each of size n. nums1[i] represents the number of '1's in the ith segment. nums0[i] represents the number of '0's in the ith segment. For each index i, construct a binary segment consisting of: nums1[i] occurrences of '1' followed by nums0[i] occurrences of '0'. You may rearrange the order of these segments in any way. After rearranging, concatenate all segments to form a single binary string. Return the maximum possible integer value of the concatenated binary string. Since the result can be very large, return the answer modulo 109 + 7. Constraints:...
Seeking Help with TLE on Leetcode Hard Problem: Maximum Value of Concatenated Binary Segments, Hi, recently I have attempted Leetcode Hard problem [3897. Maximum Value of Concatenated Binary

Full text and comments »

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

122.
By Priyansh31dec, 22 months ago, In English
CP-31 Sheet by TLE Eliminators | Handpicked Problems from 800 to 1900 Rating Hi folks! I have created a list of 31 problems in each rating from 800 to 1900 with nice reusable concepts. Link to the sheet: https://www.tle-eliminators.com/cp-sheet #### Who Am I? <spoiler summary=""> - My name is Priyansh Agarwal. I have been in this space for 5+ years. I have solved 4k+ programming problems on online judges. I am an [ICPC World Finalist](https://x.com/Priyansh_31Dec/status/1782293445723488287) and have secured [Rank 6 in a Google Kick Start round](https://x.com/Priyansh_31Dec/status/1505416520595173377). - I have created a lot of CP tutorials on my [Youtube channel 70k+](https://www.youtube.com/@PriyanshAgarwal) and [TLE's Youtube channel 35k+](https://www.youtube.com/@TLE_Eliminators) where we have posted 300+ post contest discussions of contests from Codeforces, Codechef and Leetcode to help people upsolve contests. - I have been running a competitive programming training for beginners called TLE Eliminators for the last 4 years, where we've taught 1...
from Codeforces, Codechef and Leetcode to help people upsolve contests. - I have been running a

Full text and comments »

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

123.
By NerfThis, history, 3 years ago, In English
Find a Good Subset of the Matrix This is a problem from LeetCode from the latest biweekly contest. You are given a 0-indexed m x n binary matrix grid. Let us call a non-empty subset of rows good if the sum of each column of the subset is at most half of the length of the subset. More formally, if the length of the chosen subset of rows is k, then the sum of each column should be at most floor(k / 2). Return an integer array that contains row indices of a good subset sorted in ascending order. If there are multiple good subsets, you can return any of them. If there are no good subsets, return an empty array. A subset of rows of the matrix grid is any matrix that can be obtained by deleting some (possibly none or all) rows from grid. Constraints: m == grid.length; n == grid[i].length; 1 <= m <= 10^4; 1 <= n <= 5; grid[i][j] is either 0 or 1. Instead of finding any subset, I misread the problem to be : Find the maximum number of rows that can be selected to form a subset that meet the abo...
This is a problem from LeetCode from the latest biweekly contest.

Full text and comments »

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

124.
By stepwise, history, 5 months ago, In English
Introducing AlgoRadar: An Open-Source Chrome Extension for Competitive Programming Contests Hello everyone, I often missed upcoming contests across Codeforces, AtCoder, LeetCode, and CodeChef, so I built **AlgoRadar** an open-source Chrome extension that brings upcoming competitive programming contests from multiple platforms into one place. <img src="/predownloaded/68/a0/68a0f1acaeb0a3c012d19042e12454929ae57191.png" /> <h3 style="margin-bottom: 12px;">✨ Features at a glance:</h3> <ul> <li><b>Multiple Platforms:</b> One unified interface for Codeforces, LeetCode, AtCoder, CodeChef, and more soon.</li> <li><b>Smart Filtering:</b> Filter contests by platform and time range ("Today", "This Week", or "This Month") so you only see events that matter to you.</li> <li><b>Live Countdown Timers: </b>See exactly how much time remains before registration or contest start, automatically adapted to your computer's local timezone.</i>.</li> <li><b>Fast Performance: </b>Only 88 KiB in size, with background synchronization and caching to keep contest data fresh.</li> ...
I often missed upcoming contests across Codeforces, AtCoder, LeetCode, and CodeChef, so I built

Full text and comments »

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

125.
By hermit_parth, history, 11 months ago, In English
CodeForces Daily POTD (Problem of the Day) Tamper Monkey Script Hi, I wrote a simple Tampermonkey script that adds a **POTD (Problem of the Day)** button on Codeforces. Clicking it will give you a problem with a rating similar to your current rating. **Links:** - [Download Script (GreasyFork)](https://greasyfork.org/en/scripts/560655-cf-potd) - [GitHub Repo](https://github.com/saitamapunches123/CF-POTD) --- ### DESIGN CHOICES 1. **Minimize API Calls During Contests** All API calls are done **only when clicking "POTD"**, making the button slightly slower to respond, but keeping page refresh fast and lag-free during contests. 2. **User-Specific POTD** Each user gets a **different POTD**, depending on their current rating (`curr_rating`). 3. **Rating Range** POTD will be in the range: `[curr_rating - neg_delta*100, curr_rating + pos_delta*100]` - `curr_rating` is rounded down. - Example: If a user's rating is **1650**, POTD can be one of **[1400, 1500, 1600, 1700, 1800]**. - You can cha...
4. **Unsolved Problems Only** POTD will **always be an unsolved problem**, unlikeLeetCode

Full text and comments »

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

126.
By Aylup, 21 month(s) ago, In English
Problem vs Question: Concept > Semantics The long-standing debate between "problems" and "questions" is rife with political turmoil and irrelevant tangents, but ultimately there is merit to its resolution. Both sides have valid concerns and they aren't necessarily at odds with each other. #### Concept Over Semantics 1. **The word itself doesn’t matter.** Calling something a “question” doesn’t make someone inferior or less capable. Language is fluid, everchanging and contextual, so going down a rabbit-hole of dictionary definitions is ultimately unproductive. 2. **What matters is the burden of constraints.** The difference lies in whether you are merely seeking information or actively solving something with real-world implications. I am only describing what these words mean to me and why I found it helpful in my journey. The concept is what matters, not the actual word choice. #### The Core Distinction - A **question** seeks an accurate answer. Open-ended questions receive loose answers, so the responsibility l...
#### Why This Matters As a pupil coming from LeetCode, I often overcomplicated solutions—using

Full text and comments »

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