top of page

Dealing with DSA

Public·51 members

Going throught the thinking process!

As we were discussing a few good questions during a class, I figured out one thing. No matter how good you know the language, the major part is how to crack the logic. I often get close to the logic (or sometimes completely off), but hardly get it right without hints. And they are often the simplest approaches or the shortest answers. And I go like, So it was that simple!? At the end of the day, this is the most frustrating problem! Not able to crack a logic the right way, sometimes not even the brute force approach.

So reaching out to all the professionals here, How do you crack the logic? What goes on your mind while reading a problem? How to make the code even more optimized?

51 Views
Ishika Prasad
Your post made waves — high engagement, real value.

Creator Of The Week

🔥LeetCode Daily – Cracked a Hard One!🧠

Problem: 3405. Count Arrays with K Matching Adjacent Elements📚 Topics: Combinatorics, DP, Modulo Math

💡 Key Insight:

→ Answer = m × C(n−1, k) × (m−1)^(n−1−k) % MOD

Where:

m is the choice for the first element

C(n - 1, k) is the number of ways to choose where equal pairs occur


88 Views

CodeForces sheet


I solve DSA on LeetCode only. I have been doing a lot of DSA lately, mostly questions from Linked List, Arrays, and I make sure I see if I can do the potd or not.


Recently, I tried CodeForces,and I failed on the 1st test case. I was very demotivated, so I asked a friend how he does it. He told me I should solve the CP-31 sheet. Here is the link if you are also stuck at Codeforces. From today I will start doing it as well!!

https://www.tle-eliminators.com/cp-sheet

225 Views
익명 회원
2025년 6월 16일

Thanks for that!!

Knowing DSA

Don’t Fear DSA — Embrace It Differently!


Most people say “practice more problems”, but here’s something new to try:


✨ Pair up with a friend.

Solve problems together, explain your thinking aloud, and learn from each other’s approach.


✨ Visualize first.

Before you code, draw it. Sketch your algorithm, visualize your data structures. It makes a huge difference!


61 Views

Members

bottom of page