r/Competitive_Coding • • Oct 13 '26

Advice Me

2 Upvotes

Guys, I need some advice, so I solved a few questions rated 900. Passing 800 is easy for a normal person with some DSA experience, but 900-rated problems are giving me a bit of a hard time, so for example, AvtoBus, New Years Number 2020 + 2021, Construct the string. Like, they have some trick, and I spend 30-40 mins of my good time coming up with an answer, but I am unable to figure out the solution, and then after submission I get a WA. I ask Gemini, "Where am I wrong?" and then I try to figure it out, but still I fail, or sometimes I catch the mistake, and then I see there is some fucking one-line code or some trick with math or stuff like that that makes me feel I wasted my whole hour. I know this occurred with you guys as well. But honestly, it makes me feel stupid. What should I do?

Also give me some suggestions or any lists of questions that previously helped you guys build patterns related to problems. Or is it true we learn these tricks by failing them?


r/Competitive_Coding • • Dec 17 '24

Last second Bronze USACO Solutions ($5)

Post image
2 Upvotes

r/Competitive_Coding • • Aug 21 '24

sum of unitary fraction as close as possible to 1

2 Upvotes

hi, i'm struggling with trying to code this problem without using an algortihm that is O(2**n).
the problem is: you're given the first n unitary fraction (1/2, 1/3, 1/4......1/n) and you need to find a way to sum them so as you can make the greater number smaller than one. for example, if n is 3 the answer is 1/2+1/3, for n=5 the answer is 1/3+1/4+1/5+1/5 (you can use the same fraction as many times as you want)
i really tried but got only solution in O(2**n), and can't really see a way to resolve this in a polinomial complexity (i don't even know if it's possible)
every help would be appreciate (actually i mind only the first 100 fractions but if someone can generalize the problem it would be great, i personally think the answer rely probably in some mathematical properties that i'm unaware of)


r/Competitive_Coding • • Jan 07 '22

How to build a solid foundation for competitive programming (books preferred)

2 Upvotes

Hello ! I got interested in competitive programming pretty late i.e after 4 months joining my first software engineering job . I realised that I suck at implementation of algorithms , so even though I know djisktra will be useful to solve this , i cant implement it even though I understand it.
I want to build a solid foundation where I thoroughly understand and can implement important Data Structures and Algorithms in C++ .I would prefer a book , I like using pen and paper to solve so kindly recommend such books .
Thanks a ton !!
I am comfortable with Python but C++ is preferred and it would make me write better programs I believe.


r/Competitive_Coding • • Jul 14 '21

FaaS Wars II - Serverless Robot Coding Challenge

2 Upvotes

Hi guys,

Here is a serverless robot coding hackathon by Nimbella where you can code your robots in Java and defeat other robots. The final round will take place on the 26th of July and the prize amount is $800. It is a good chance to learn serverless, participate in a hackathon, and win cash prizes.

You can participate here: https://www.hackerearth.com/challenges/hackathon/faas-wars-season-2/ or code your robots directly here: https://nimbots-apigcp.nimbella.io/

To learn how to code your robot here is a tutorial:https://www.youtube.com/watch?v=sh8iAE5hrt0


r/Competitive_Coding • • May 09 '21

Need help with this GFG problem

2 Upvotes

I am trying to write the memoized or recursive code for this gfg problem which asks us to find find-length-longest-subsequence-one-string-substring-another-string. I did manage to find this -

static int count(String a, String b, int m, int n)
{ 
    if (n==0 || m == 0) return 0;
    
    count(a,b,m-1,n); 
    count(a,b,m, n-1);

    if(t[m][n] != -1) return t[m][n];

    if (a.charAt(m - 1) == b.charAt(n - 1)) 
        t[m][n] = 1 + count(a, b, m - 1, n - 1); 
    else 
        t[m][n] =  count(a, b, m-1, n);
    
    if(max > t[m][n])
         max = t[m][n];
    
    return t[m][n]; 
}

I think this may cross O(m*n) too right? Is there a better approach?

count(a,b,m-1,n);
count(a,b,m, n-1);

If there is a better memoized or recursive solution, kindly share the same. Thanks in advance!


r/Competitive_Coding • • Dec 28 '20

Program to Validate Username

Thumbnail
matrixread.com
2 Upvotes

r/Competitive_Coding • • Nov 06 '19

HELP !!!

2 Upvotes

How to build the logic building and how to start with codechef's monthly long challenge ? Please ...help


r/Competitive_Coding • • Oct 30 '19

Need a hint on solving this question??

2 Upvotes

r/Competitive_Coding • • Oct 26 '19

Our first Blog

2 Upvotes

Hey guys, this is our group's first blog containing a couple of competitive questions. I'm sure it will be interesting. Make sure to check it out, and leave youe claps.

https://medium.com/@harikumar20112000/cracking-the-code-ca398240a03d

P.S. Our professor has assured us that we would get movie tickets if we get claps more than 150 people. So please help us win guys! 😁


r/Competitive_Coding • • Apr 30 '19

An interesting application of segment trees

2 Upvotes

https://www.codechef.com/NOV17/problems/CSUBQ

Check out the problem and editorial, I really liked the way they used segment trees.


r/Competitive_Coding • • Mar 18 '26

Need of team for contest

Thumbnail reddit.com
1 Upvotes

r/Competitive_Coding • • Feb 04 '26

Accenture phase 1 result declared

Post image
1 Upvotes

r/Competitive_Coding • • Dec 21 '25

Servers for competitive coding

Thumbnail reddit.com
1 Upvotes

r/Competitive_Coding • • Dec 18 '25

Hi

Thumbnail google.com
1 Upvotes

Does anyone have like a small discord server for competitive coding?


r/Competitive_Coding • • Nov 22 '25

Solved One Question in TCS CodeVita Round 2 – What Happens Next?

1 Upvotes

I managed to solve one question in TCS CodeVita Round 2 this year. I’m wondering — what are the chances of progressing further? Will I get shortlisted for interviews or the next round based on this?

If anyone has experience from previous years, I’d love to hear what happened after clearing one question


r/Competitive_Coding • • Aug 28 '25

Hey is this reddit still active.

1 Upvotes
  1. can you share the competitive programming communities.

  2. i think that this community ? if yes, can you guys , share which reddits for following as a competitive programmer apart from r/codeforces


r/Competitive_Coding • • May 14 '25

Suggestion Please

1 Upvotes

I want a good ml course for beginners can you suggest some courses ? I will be going to second year so I have ample time so please suggest accordingly.


r/Competitive_Coding • • Apr 22 '25

Suggestion

1 Upvotes

Can anyone provide me sources for starting ML from basics ?


r/Competitive_Coding • • Apr 22 '25

How do I genuinely start learning competitive coding effeciently

1 Upvotes

I really want to learn competitive coding, and I have tried a dozen times before however all my resources were scattered and I have zero clue where to start from. Please help

For bg info, I know, id say an intermediate level of Python, C++, and java (although Ill prolly need to brush up on these languages as I havent coded anything in a long time due to exams and whatnot) Id preferably NOT use java.

So if anyone could guide me on how to start, please let me know. Id prefer video tutorials, but genuinely anything would help. Thank you!


r/Competitive_Coding • • Apr 22 '25

ADVICE NEEDEED

1 Upvotes

See I will complete my 1st year in a week and my 2.5 months summer vac will start so I want an advice on what do this during this time I have learnt dsa this sem in c and am quite good in it but I have not done questions from leetcode or anywhere( did some but they were just for lab exams). So I want an advice on whether I should do dsa in c++ and solve problems on leetcode or learn something new like AI ML and web dev?


r/Competitive_Coding • • Apr 03 '25

Completely stuck on this question, can anyone provide an approach?

1 Upvotes

There is 2d Matrix of size h*w representing the city.

Each cell can be 0,1,2,3,4

0-> road

1->Tree

2-> Garage

3-> warehouse

4-> Airport

There is a truck parked at the Garage, Truck’s task is to go to the warehouse (one or many at a time) , load the goods and unload the truck at the airport.

There is no limit on the number of goods a truck can carry.

There is a cost associated with a truck.

Cost is (Number of blocks it has moved * (1+Number of good truck carries)) like

To move one block cost is 1 on an empty truck

Cost is 2 if truck has 1 good

3 if the truck has 2 goods.

……….

You have to tell how many maximum goods can be unloaded at airport using at max C cost

Constraints

Number of test cases - 50

h,w belongs to (2,40)

c belongs to (5,2000)

There can be at max 13 warehouses

Truck cannot pass a tree, if it is at any warehouse truck can or cannot load the goods, similarly if it's at an airport it's not necessary to unload the goods.

But starting point is fixed ie garage


r/Competitive_Coding • • Jan 05 '25

Help with this HARD Question.

Thumbnail reddit.com
1 Upvotes

r/Competitive_Coding • • Dec 28 '24

Related to building/joining a good coding community

1 Upvotes

Hello everyone , I am a newbie at CP . I was just thinking of creating/joining a healthy coding community where i can learn stuff and contribute too . I am doing Codeforces and Codechef these days .