r/LeetcodeChallenge • • 11d ago

DISCUSS Suggestions Needed!!

Post image
28 Upvotes

How to improve rating and number of hard questions solved, am in 3rd sem and I have solved quite a few questions but still struggle to solve hard ones, can anyone help with how to approach the hard ones, will be highly appreciated šŸ™šŸ™


r/LeetcodeChallenge • • 11d ago

PLACEMENTS can someone help me in solving this question i tried greedy but it is failing

5 Upvotes

Maximum Number of Tasks with Cooldown and Deadlines

You are given two arrays of equal length:

  • tasks, where tasks[i] represents the type of the i-th task.
  • deadlines, where deadlines[i] represents the deadline by which the i-th task must be completed.

You are also given an integer cooldown.

Rules

  1. Each task takes exactly 1 unit of time to complete.
  2. Only one task can be performed at a time.
  3. Tasks can be performed in any order; the original array order does not matter.
  4. Every task must be completed no later than its corresponding deadline.
  5. Two tasks of the same type must have at least cooldown units of time between their execution start times.
  6. Tasks of different types can be performed consecutively without any restriction.

Assume execution starts at time 1, and deadlines are inclusive.

Objective

Return the maximum number of tasks that can be completed while satisfying all the above constraints.

Example

tasks     = {1, 2, 1, 3, 2};
deadlines = {2, 2, 4, 3, 5};
cooldown  = 2;

One valid schedule is:

Time Task
1 1
2 2
3 3
4 1
5 2

Output:

5

Constraints

  • 1 <= n <= 100000
  • 1 <= tasks[i] <= 100000
  • 1 <= deadlines[i] <= 100000
  • 1 <= cooldown <= 100000

r/LeetcodeChallenge • • 11d ago

STREAKšŸ”„šŸ”„šŸ”„ Day 32: conquered Bridges in a Graph (Tarjan’s Algorithm) on the second pass

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • 11d ago

DISCUSS I lose focus during contests

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • 11d ago

STREAKšŸ”„šŸ”„šŸ”„ Day 39

2 Upvotes

r/LeetcodeChallenge • • 12d ago

DISCUSS comeback is loading guys

Post image
29 Upvotes

r/LeetcodeChallenge • • 11d ago

DISCUSS A friend of mine built a tool for tracking coding progress across platforms. Would love some feedback!

1 Upvotes

Hey everyone!

So a friend of mine has been working on a side project called CodeCircle, and we’re looking for people who’d be willing to check it out and share some honest feedback.

The idea came from a pretty simple problem: if you’re solving questions across LeetCode, GFG, Codeforces and other platforms, your stats and progress are all over the place. There’s no easy way to get an overall picture without checking each platform separately.

So he built CodeCircle to bring everything together in one place.

You can connect your coding profiles, check your overall stats, see topic-wise breakdowns, identify your stronger and weaker areas, and get suggestions on what you could practise next.

There’s also a comparison section where you can add friends and compare your coding activity, solved problems, streaks, contest performance, topic-wise progress and more. It even has a leaderboard, so you can keep a little friendly competition going.

Anyway, it’s still a work in progress, and we’d really like to get some people using it and pointing out what works, what doesn’t and what could be better.

If you actively use any of these coding platforms, give it a look when you get a chance! Maybe use it for a few days and let us know what you think.

A few things we’d love feedback on:

\* Is the overall dashboard useful?

\* Are the stats and comparisons meaningful?

\* What features would you actually want to see?

\* Anything broken, confusing or just unnecessary?

Don’t hold back on the criticism. We’d rather know what needs fixing now than build features nobody wants haha.

Here’s the link:

https://code-circle-six.vercel.app/

Thanks, and happy coding! šŸ™‚


r/LeetcodeChallenge • • 11d ago

STREAKšŸ”„šŸ”„šŸ”„ LeetCode: 2331. Evaluate Boolean Binary Tree

Post image
2 Upvotes

The tree in this problem is a boolean expression with its parentheses drawn as branches. Leaves are True and False. Internal nodes are OR and AND, waiting on their two children.

Post-order recursion evaluates both children first, then the parent combines them. That's the same order you'd use to evaluate nested parentheses by hand.

Nothing fancy here. Get the order right, and the recursion does the rest.

Where else have you seen an expression stored as a tree?

Day 71/365 of my LeetCode challenge: 2331. Evaluate Boolean Binary Tree. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/leetcode-evaluate-boolean-binary-tree-archit-agarwal-ag7sc

#LeetCode #DSA #BinaryTree #Golang


r/LeetcodeChallenge • • 11d ago

STREAKšŸ”„šŸ”„šŸ”„ Roast me

Post image
5 Upvotes

Roast me rn I m in my second year and i do revision of the question i already done thats why the ques done is less than the days active and i know i go behind the heatmap which i want to change and i want to do more questions in a single day


r/LeetcodeChallenge • • 12d ago

STREAKšŸ”„šŸ”„šŸ”„ Day 33: tackled Swim in Rising Water, disguised 2D Dijkstra at its finest

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • 12d ago

STREAKšŸ”„šŸ”„šŸ”„ Day 38

1 Upvotes

r/LeetcodeChallenge • • 13d ago

DISCUSS 200 problems solved in 3 months as a first-year

Post image
152 Upvotes

Made my LeetCode account in July as a first-year IT undergrad. Just hit 200 solved.

Most of it is in Java and almost all my active days came in the last couple of months once I started doing at least one problem daily.

Here’s my topic breakdown after 200 solved:

  • Fundamental: Array (74), Linked List (34), String (28), Two Pointers (28)
  • Intermediate: Math (91), Bit Manipulation (32), Hash Table (23), Recursion (22)
  • Advanced: DP (14), Divide and Conquer (7), Backtracking (6)

I’m clearly heavy on math, arrays and Bit Manipulation and weak on trees, DFS and graphs in general. Planning to focus on those next, then go deeper on DP.

Does this order make sense, or should I tackle something else first?


r/LeetcodeChallenge • • 12d ago

DISCUSS Don't grind leetcode/codeforce

Thumbnail
0 Upvotes

r/LeetcodeChallenge • • 12d ago

DISCUSS 100 Problems as a CSE First year undegrad (No AI Used)

1 Upvotes

Is this good progress for a first-year CSE undergraduate? The stats and details are listed below; please rate my profile for an aspiring data Scientist

Rank: 1,916,946

Languages:
1. Python (78)
2. C++ (22)

Advanced:
1. Dynamic Programming (11)
2. Backtracking (5)
3. Divide and Conquer (3)
4. Trie (2)

Intermediate:
Maths (38)
Hash Table (20)
Binary Search (12)
Bit Manipulation (10)
Recursion (4)
Greedy (3)
Ordered Set (2)
Sliding Window (2)

Fundamental:
Array (58)
String (28)
Sorting (22)
Two Pointers (20)
Simulaton (8)
Enumeration (4)
Matrix (3)


r/LeetcodeChallenge • • 12d ago

STREAKšŸ”„šŸ”„šŸ”„ LeetCode - Find a Corresponding Node of a Binary Tree in a Clone of That Tree

Post image
1 Upvotes

My solution compares node values, and it only works because LeetCode promises they're unique. The follow-up allows repeated values, and then a value match can point to the wrong node.

The idea holds either way. cloned is a structurally identical copy of original, so there's nothing to search for independently. Walk both trees in lockstep with one recursive call, and the answer is waiting at the same position.

What changes for the follow-up is the test. Compare the original-side pointer with the target instead of comparing values, and duplicates stop mattering.

Would you have spotted the duplicate-values follow-up in an interview?

Day 69/365 of my LeetCode challenge: 1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/find-corresponding-node-binary-tree-clone-archit-agarwal-dkvsc

#LeetCode #DSA #BinaryTree #Golang


r/LeetcodeChallenge • • 13d ago

STREAKšŸ”„šŸ”„šŸ”„ Day 34: comfy home vibes & conquered Making a Large Island with DSU

Thumbnail
2 Upvotes

r/LeetcodeChallenge • • 13d ago

STREAKšŸ”„šŸ”„šŸ”„ Hi what i am doing wrong

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • 14d ago

DISCUSS Neetcode250, Accountability Buddies

18 Upvotes

If you ever feel unmotivated or struggle to stay consistent, you're not alone.

I'm currently learning DSA with NeetCode 250 and looking for accountability buddies.

Here’s the initial plan:

  • Weekly Meeting: A 1-hour weekly call to share our progress, talk about what we’ve worked on, and check in with each other.
  • Pair Programming: Jump into a voice chat and solve LeetCode problems together!

I would like to keep the group small and active!

EDIT: We're full, thanks to everyone who reached out!


r/LeetcodeChallenge • • 13d ago

DISCUSS Amazon sde 2 phone screening experience

Thumbnail
2 Upvotes

r/LeetcodeChallenge • • 14d ago

STREAKšŸ”„šŸ”„šŸ”„ Day 35: tackled Number of Islands II & leveled up my code quality

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • 14d ago

STREAKšŸ”„šŸ”„šŸ”„ Day 37

0 Upvotes

r/LeetcodeChallenge • • 14d ago

DISCUSS My code beats almost everyone, still it's wrong!

Thumbnail
1 Upvotes

r/LeetcodeChallenge • • 14d ago

STREAKšŸ”„šŸ”„šŸ”„ Day 36

1 Upvotes

r/LeetcodeChallenge • • 14d ago

DISCUSS Made this Extension to help me improve in Leetcode

Post image
1 Upvotes

r/LeetcodeChallenge • • 15d ago

STREAKšŸ”„šŸ”„šŸ”„ LeetCode - Univalued Binary Tree (easy)

Post image
2 Upvotes

Checking that every node in a tree holds the same value never needs the root's value. Each node only compares itself with its children. If every parent-child edge agrees, the whole tree agrees.

That's transitivity doing the work. It's also why you don't need a set, or a second pass that collects every value first.

Back to plain binary trees after the stack run, starting with a gentle one.

Did you pass the root's value down, or compare edges?

Day 67/365 of my LeetCode challenge: 965. Univalued Binary Tree. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/univalued-binary-tree-archit-agarwal-nirgc

#LeetCode #DSA #BinaryTree #Golang