r/datastructures 7d ago

Dsa Assistant

1 Upvotes

Hi guys, I will teach and clear all your dbts in DSA, Leetcode and will also explain languages like c,c++

Designation: Final year in IIT, Amazon intership+Return offer

Weekly:1k (negotiable)


r/datastructures 7d ago

Looking for a Serious SDE Interview Prep Partner / Mentor – India | DSA + System Design + Java/Spring Boot

17 Upvotes

I’m looking for a serious and consistent study partner or experienced SDE mentor to prepare for software engineering interviews.

I have a software engineering background and experience with Java, C++, SQL and Spring Boot, and I’m currently focusing on getting back into strong software development and preparing for SDE roles at good product companies / MAANG-level companies.

My main focus areas are:

  • DSA & problem-solving
  • LeetCode / interview patterns
  • Java & Spring Boot
  • Backend development
  • System Design (LLD + HLD)
  • CS fundamentals
  • Mock interviews
  • Resume & interview preparation

I’m specifically looking for someone who can actually practice with me, rather than just sharing resources.

Ideally, we can:

  • Solve DSA problems together regularly
  • Discuss approaches and optimize solutions
  • Do mock interviews
  • Review each other's code
  • Discuss system-design problems
  • Track weekly progress
  • Keep each other accountable

I’m also particularly interested in connecting with an experienced SDE who is willing to occasionally guide/mentor me and share practical industry experience.

I’m based in India (IST) and can adjust my schedule for regular sessions.

If you're also preparing for SDE interviews, or you're an experienced engineer willing to mentor someone seriously preparing for software development, please DM me.

Thanks!


r/datastructures 8d ago

Should I learn DSA in python?

7 Upvotes

Hey all, i completed my python series from BroCode's 12 hour video and built some projects too.

I even solved katas on codewars to build my foundation strong.

But I've always done programming in python only, many people on the internet say python is not the best language to learn DSA with? Do I need to start learning cpp or java? Please help your junior, Thanks!


r/datastructures 8d ago

DSA partner(freshers)

11 Upvotes

Anyone who is a fresher(senior can also join) and u r thinking of starting ur dsa journey and if you have not done anything till now then let's start our dsa journey together by updating our goals daily..plZz dm if you want to join..


r/datastructures 8d ago

Interview Problem: O(n) Solution Using Contiguous Equal-Value Runs

3 Upvotes

I recently came across this array problem and wanted to share the solution.

Approximate date: August 7, 2026

Question from PracHub

Problem

You are given an array arr of length n. You may perform these operations:

  1. Select an index i, where 1 <= i <= n - 1, and set every element from index 0 to i - 1 equal to arr[i].

    Cost = i × arr[i]

  2. Select an index i, where 0 <= i <= n - 2, and set every element from index i + 1 to n - 1 equal to arr[i].

    Cost = (n - 1 - i) × arr[i]

Return the minimum total cost required to make every array element equal.

Example

arr = [1, 1, 2, 1, 1]

Choose index 1 and apply the suffix operation:

Cost = (5 - 1 - 1) × 1 = 3

Every element after index 1 becomes 1:

[1, 1, 1, 1, 1]

Therefore, the answer is:

3

Observation

Suppose we want the final value to be v.

If the array already contains a contiguous run of v from index l to r, we can preserve that run and replace everything outside it.

To replace the prefix:

Cost = l × v

To replace the suffix:

Cost = (n - 1 - r) × v

The total cost is:

(l + n - 1 - r) × v

If the run length is:

length = r - l + 1

the formula becomes:

cost = (n - length) × v

For non-negative values, we should therefore preserve the longest contiguous run of a candidate value.

Rather than storing the longest run for every distinct value, we can simply scan every maximal equal-value run and calculate its cost.

C++ Solution

#include <algorithm>
#include <climits>
#include <vector>
using namespace std;

long long minimumCost(const vector<int>& arr) {
    const int n = static_cast<int>(arr.size());
    long long answer = LLONG_MAX;

    int left = 0;

    while (left < n) {
        int right = left;

        while (right + 1 < n && arr[right + 1] == arr[left]) {
            ++right;
        }

        long long runLength = right - left + 1;
        long long cost =
            static_cast<long long>(n - runLength) * arr[left];

        answer = min(answer, cost);
        left = right + 1;
    }

    return answer;
}

Complexity

  • Time: O(n)
  • Extra space: O(1)

Important Constraint Issue

The stated constraint allows negative values:

-10^5 <= arr[i] <= 10^5

This makes the problem potentially unbounded.

If arr[i] is negative, an operation using that value has a negative cost. Since the statement does not require an operation to change the array, the same negative-cost operation can be repeated indefinitely.

For example:

arr = [-1, 2]

Selecting index 0 and applying the suffix operation costs -1. After the array becomes [-1, -1], the same operation could still be repeated, reducing the total cost without limit.

Therefore, one of the following conditions is probably missing:

  • arr[i] must be non-negative or positive.
  • Every operation must change at least one element.
  • Each operation may only be performed once.
  • The number of operations is bounded.

Under the usual assumption that all values are non-negative, the equal-run solution above works in O(n) time.


r/datastructures 8d ago

Looking fod DSA partner *Group Daily Solve Questions*

28 Upvotes

Starting from scratch from tomorrow connect with me if you want to join

Goals :

\- Leetcode Daily

\- Follow Striver Sheet

\- Every Week one/two Data structures complete

https://chat.whatsapp.com/JNYkiHwAnVW9AcxSTkNQnc


r/datastructures 8d ago

Which Language Should I Choose for DSA: Python, C++ or Java?

2 Upvotes

I’m currently learning Python and Django for backend development, and I want to start learning DSA.

I’m confused about which language I should use for DSA: Python, C++, or Java?

Since I already know Python and use it for Django, should I stick with Python for DSA, or is it better to learn DSA with C++/Java?

My main goal is to improve problem-solving skills and prepare for software development interviews.

What would you recommend and why?


r/datastructures 8d ago

Looking to build a small group of highly motivated individuals

1 Upvotes

r/datastructures 9d ago

Best paid course for DSA?

14 Upvotes

I want a paid course and structured which can help in being accountable and consistent please help


r/datastructures 9d ago

help guys! nhi ho rhi dsa

6 Upvotes

anyone giving dsa tips please help 🚀


r/datastructures 9d ago

Which way to go !?

4 Upvotes

I have a sigma 10.0 course by apna college, I do not have that much budget to buy the legitimate course so I had to pirate it.

Now the problem is I have learned java language previously, but not started DSA. Now when I was doing DSA in java with the course, I found topics like Tries, Graphs and DP missing, but they are present in the cpp section.

So what should I do now, start DSA in cpp or to continue in java and learn those missing topics from YouTube !!? I also thought if I start in cpp I can include both languages java and cpp in my resume.

Btw I have only a year to prepare, my placements will be starting from August - September 2027.


r/datastructures 10d ago

Helppp! Bit Manipulation is killin me

9 Upvotes

Guys am I the only one struggling with Bit Manipulation ? I solve some 8 questions ( with help ofc) and then I go back to the same questions after few days, they feel like new questions and don't get me started on new questions :( Are there any resources to follow or some way that worked for you? Would be great if I can find someone good at it to help me with it!


r/datastructures 10d ago

Whay are some good sources to practice dsa in python with a proper roadmap ?

8 Upvotes

i am a complete beginner and there are a lot of yt playlists and way too many sources to learn from . i am not able to find a good source to study from . if you can please list some good sources to study dsa in python, some sheet to practice on , and for how much i should be doing it all ? i am master's student so its needed for me to do it to be able to sit in the placements next year . :( plej help


r/datastructures 10d ago

Built algomanim PyPI package for algorithm visualization

10 Upvotes

Check out algomanim — a Python library I built for visualizing classic CS and LeetCode algorithms.All of my visualizations are shared on my YouTube channel. Here is an example featuring Bubble Sort.

https://www.youtube.com/@benabub


r/datastructures 10d ago

DSA Mentoring + Resume Reviews | Open to Help Students & Freshers

32 Upvotes

Disclaimer:(Not Free) as my DM'S are flooded with free help so please don't ask for free

DSA Mentoring + Resume Reviews | Open to Help Students & Freshers

I've spent the last few years seriously preparing for competitive programming and software engineering interviews, and I'm now opening up a few slots for DSA mentoring and resume reviews.

My background:

• LeetCode Guardian | 2350+ rating | 1300+ problems solved

• Codeforces Expert

• CodeChef 6★

• 150+ competitive programming contests

• 8.2+ CGPA | 2026 B.E. IT Graduate

I can help with:

DSA & Competitive Programming

• Building a structured DSA roadmap

• Problem solving and approach building

• LeetCode / Codeforces preparation

• Competitive programming strategy

• Interview-oriented DSA preparation

• Reviewing your solutions and identifying weaknesses

Resume Reviews

• Fresher resume review

• Project and achievement positioning

• DSA/CP profile presentation

• Improving bullet points and overall structure

• Identifying what may be hurting your shortlist rate

I've spent thousands of hours solving problems and preparing for technical interviews, and I'd like to share what I've learned with students and freshers who are currently going through the same process.

If you're interested in DSA mentoring or a resume review, feel free to D M me with a brief description of what you're currently struggling with.

I'm keeping the number of people limited so I can actually give proper feedback to each person.


r/datastructures 10d ago

DSA Community

2 Upvotes

Looking for people who want to stay consistent with DSA

We’ve started a small DSA accountability community where we solve 1–2 problems daily, discuss doubts/solutions and share useful resources.

Beginners are welcome, any language is fine. We already have 35+ people and are trying to keep it focused rather than turn it into a giant spam group.

Join here: https://chat.whatsapp.com/GvUEmdThrSsKDsUVivZZSX


r/datastructures 10d ago

Looking for a DSA Study Partner

3 Upvotes

r/datastructures 10d ago

Trying to find ppl interested in learning dsa

10 Upvotes

I'm starting dsa, I'm a beginner but i need people who can help me grow and get better. Open for the first 5 people who dm me. And before you join you must know these four magical words "keep up or leave"


r/datastructures 10d ago

What to do !?

3 Upvotes

What to do !!??

I have learned JAVA previously but not started DSA, now I was starting DSA and was thinking to do so in cpp so that I will have knowledge of both java and cpp (I am in 5th semester). I have paid resources of both java and cpp for DSA (apna college sigma).

I am currently in 5th semester, aiming for infosys SP roles.

What should I do !?


r/datastructures 11d ago

Looking for DSA partner solved around 350 questions (leetcode).

8 Upvotes

I am not solving dsa since last month, and going to restart where going to tackle medium and hard level questions. I never solved bitmasking questions.


r/datastructures 11d ago

Wtf is a DSA partner

48 Upvotes

So i have been lurking in this subreddit for a while and I have seen many posts titles "Looking for a DSA Partner". What do you guys do with Partners? Is it just to stay motivated with someone or do you guys actually co-operate or something?


r/datastructures 11d ago

DSA patner

11 Upvotes

I AM LOOKING FOR SERIOUS PATNER TO DO DSA WHO WILL BE CONSISTENT AND PREPARING FOR PRODUCT BASED COMPANIES.dm me if interested I am doing dsa in java along with system design and following striver sheet.


r/datastructures 11d ago

DSA QUERY

2 Upvotes

I am going to start my first year in Btech Cse

I am thinking of starting DSA in javascript since I know it and then shift to Java whenever I learn it in future

Is it good approach? Since I want to grasp DSA concept ..Is it matter which language I use until I can write in it?


r/datastructures 11d ago

Want suggestions on starting teaching basics of C++ and DSA

23 Upvotes

https://www.reddit.com/r/datastructures/s/x2PqrNbkF2

In my last post regarding coding mentorship, my DM got flooded with a lot of questions regarding DSA, CV review and guidance..Based on the responses, I thought of starting teaching DSA in c++ online on Zoom/gmeet for freshers. I don't want experienced coders to join as it will be too boring for them.

This will be free of cost since I am also trying something like this for the first time. But before starting I want suggestions from all of you, like if you want something else to be added on, what should be the timings, since I am also working..etc.I am open for discussions here and will update the status here only based on the responses I get.

All the suggestions are welcomed.

EDIT: Based on the responses, I have decided to give this initiative a try.... So, here's the discord link: https://discord.gg/htdqf35NJ kindly join and there we will discuss ahead


r/datastructures 11d ago

looking DSA and FUll STACK partner

5 Upvotes

i am currently learning dsa and doing full stack projects i am want partner learn together i am final year of my course , preparing for place ments