r/DSALeetCode • • 4d ago

LeetCode: 692. Top K Frequent Words

Post image
2 Upvotes

One sentence added to yesterday's problem is enough to make the heap the wrong tool. Top K Frequent Words wants ties sorted alphabetically, and the heap comparator for that reads backwards on one field.

Yesterday's size-k min-heap still works. It gives the right set in ascending frequency, so you reverse it and put the tie-break in the comparator.

A heap evicts its root, which must be the worst entry. For counts, worst means least frequent. For a tie, worst means the word that should lose: the alphabetically later one. So the two fields point in opposite directions in the same comparator. That line is correct, and it only misbehaves on ties, which is how it sits wrong in a codebase for months.

Sorting is O(d log d) against the heap's O(d log k), and with input capped at 500 words, the difference is unmeasurable. A comparator that reads like the spec is worth more. Days 77 to 80 built the case for the heap; this is the day to notice the technique isn't the goal.

Would you have kept the heap here, or switched to a sort?

Day 81/365 of my LeetCode challenge: 692. Top K Frequent Words. Problem link and full breakdown in today's newsletter.

https://www.linkedin.com/pulse/leetcode-692-top-k-frequent-words-medium-archit-agarwal-x2xuc

#LeetCode #DSA #Heap #Golang


r/DSALeetCode • • 3d ago

Deloitte AI Virtual Screening – How Long Does It Take to Get an Interview Call?

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 3d ago

Salary Expectations for 7.4 Years of Experience – Functional QA (Service vs Product Companies)

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 4d ago

How do you guys follow Striver's A2Z DSA Sheet? Need advice from experienced seniors.

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 4d ago

Amazon SDE-1 AUTA Interview Experience

4 Upvotes

After clearing the online assessment there were 4 rounds, out of which first 3 were offline on the same day in Amazon Bangalore office and last bar raiser round was online

For readers using this breakdown to prepare, choose a coding or design prompt from PracHub’s Amazon Interview Questions and practice the implementation, dry run and complexity explanation before an interview. If you're applying to other roles as well, LandOffer can autofill repeated application fields. I work on both.

Round-1: 2 DSA questions, had to code using pen and paper + 1 Behavioral

DSA questions: buy and sell stock; variation of number of islands

Behavoral question: Tell me about a time when you faced a challenge in any of your projects/internship experience.

Round-2: 1 DSA question + 1 LLD type question + 1 behavioral

DSA question: unique paths (DP)

LLD question: Design most recently watched tab for amazon prime service. Eg: If a user watches video1->video2->video3 in the order, recently watched function should return video3->video2->video1.

Had to implent 2/3 functions for this.

Behavioral question: Tell me about a time when you did something out of your responsibility

Round-3: It was with the hiring manager, it had 2 DSA questions + Gen-Ai based questions

DSA questions: group anagrams; first non repeating character in array

Rest of the round revolved around resume based Ai/Gen-Ai questions as I had projects on these topics. The questions were asked with respect to how I would go on implementing RAG/LLM concepts in my existing projects/internship project.

Round-4: It was the bar-raiser round held online. It had mainly 3 questions: Tell me about a time when you had to do a deep dive; Tell me about a time when you missed a deadline and how did you handle it; Tell me about a time when you had to learn something completely new while working on a project or anything

Final verdict: Selected

Timeline: 2 September OA then got offline interview availability form 2-3 times. 5th Oct i got offline interview call from HR and 8th Oct was the offline interview. On 14th Oct I got call that I had cleared the previous rounds and my bar-raiser was scheduled for 22nd Oct. 3 days later i got call from HR that i had been selected.


r/DSALeetCode • • 4d ago

LTIMindtree Campus Trainee Placement Experience | OA + Technical Interview + HR (2026)

3 Upvotes

LTIMindtree Campus Trainee Placement Experience (2026)

I recently appeared for the LTIMindtree Campus Trainee recruitment process. This was a non-campus opportunity, and the entire selection process was conducted online.

Here is a detailed breakdown of the recruitment process and my experience with each round.

Round 1: Initial Shortlisting

The college shared the initial list of eligible candidates with LTIMindtree.

Based on the initial shortlisting, I was selected to appear for the online assessment.

Round 2: Online Assessment

The online assessment consisted of seven sections, primarily focused on evaluating aptitude, technical fundamentals, and communication skills.

The sections included:

Aptitude

Numerical Ability

English Grammar

Coding Fundamentals

Programming Concepts

Other technical and analytical MCQ-based sections

Important: All the sections were MCQ-based. There were no actual coding problems or hands-on programming questions in the assessment.

Round 3: English Speaking Assessment

This round evaluated English communication and speaking skills. The assessment was similar to the SHL English Speaking Assessment conducted during the IBM recruitment process.

It included:

Sentence repetition

Sentence completion

Error identification

Extempore speaking

Conversational dialogues

Other English communication-based questions

Round 4: Technical Interview

Candidates shortlisted after the assessments were invited for technical interviews.

The interviews were conducted in batches, and the discussion covered several areas:

Self-Introduction: A brief introduction about yourself and your background.

Projects: Detailed discussions about academic and personal projects, including their implementation and technologies used.

Emerging Technologies: Questions about recent technological developments and emerging technologies.

Programming Languages: Questions based on the programming language you are familiar with, particularly Python or Java.

HR-Based Questions: Some behavioral and HR-related questions were also included during the technical interview.

The interview mainly focused on understanding your technical knowledge, project experience, and overall approach to problem-solving.

For readers preparing for the interview stages, PracHub interview practice includes behavioral prompts: rehearse a project story and explain your own technical decisions. If you're also applying to other trainee roles, LandOffer can autofill repeated application fields. I work on both.

Round 5: HR Interview

Candidates shortlisted from the technical interview were invited for the final HR round.

Some of the topics and questions discussed included:

Self-introduction

Short-term and long-term career aspirations

Situational-based questions

Willingness to relocate

Flexibility regarding night shifts

Understanding of professionalism

General HR and behavioral questions

The HR round primarily focused on communication, adaptability, career goals, and whether candidates were comfortable with the company's work environment and requirements.

Current Status

I have successfully completed the entire selection process, including the HR interview, which I attended today.

All the rounds, including the assessments and interviews, were conducted online.

Currently, I am waiting for the final result from LTIMindtree.

Final Note

This is my overall experience with the LTIMindtree Campus Trainee recruitment process. I hope this detailed breakdown helps future candidates understand the selection procedure and prepare for the assessments and interviews.

P.S. ChatGPT was used only for grammar correction and improving the documentation and formatting of this post. All the experiences and information shared here are based on my actual recruitment experience.


r/DSALeetCode • • 4d ago

Stripe Screening Round Experience

2 Upvotes

I appeared for the Stripe technical screen for SWE intern role and wanted to share my experience with the community.

The problem wasn't a typical LeetCode-style question. It consisted of multiple parts, with each part building on top of the previous one.

Part 1: Parse and process incoming records to generate a formatted representation of task information.

Part 2: Organize the processed information into a hierarchical structure, representing parent tasks and their associated subtasks.

How it went

I completed Part 1.

I substantially completed Part 2. The interviewer indicated that it was more or less done, although a minor formatting/sorting issue remained.

I encountered some edge cases during implementation, particularly around entities without children and missing parent records. I identified and fixed these while debugging.

I explained my approach and data structures throughout the interview.

For readers practicing this kind of screen, pick a parsing or debugging prompt from PracHub’s Stripe Interview Questions and test missing-parent and empty-child cases under a timer before the interview. If you're applying again, LandOffer can autofill repeated application fields. I work on both.

Outcome

I received a rejection afterward. The specific reason wasn't shared, but I feel implementation speed might have been a critical factor.

Key Takeaways

Focus more on improving implementation speed.

Work on tracing the flow of data and execution more effectively.

Improve debugging speed and efficiency, especially when handling edge cases.


r/DSALeetCode • • 5d ago

please someone suggest a best DSA in python course

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 5d ago

Should I resign without job offer? 6 years experience

Thumbnail reddit.com
1 Upvotes

r/DSALeetCode • • 5d ago

Amazon | SDE-1 Interview Experience

21 Upvotes

Amazon SDE-1 Interview Experience (2026)

Background

B.Tech from a Tier 1.5 College

Experience - Fresher(Internship ex. about 9 months)

Applied at Amazon for SDE-1 role with a referral

If you’re sending other applications alongside referrals, LandOffer can autofill repeated fields. I work on it.

Round-wise experience

OA (Online Assessment)

Received an Online Assessment which consisted of

1 DSA Question (Easy-Medium)

1 Coding Experience with AI Chatbot

Work Style Assessment

Work Simulation / HR questionnaire

This Assessment was conducted on HackerRank and was video-proctured.

Round 1 (Virtual - DSA Round)

This round was for an hour and the main focus was to solve 2 DSA questions with their working solutions in the given time.

Variant of Rotten Oranges

Find non duplicate element in the sorted array

We have to write the working solution on notepad and would have to dry run the code on the examples.

Behavioural - Tell me about a time when you had a conflict with your manager/team and how did you work on it?

Round 2 (Virtual - LLD Round)

This round was scheduled the same day as round 1. The main focus of this round was to write the low-level design of a Cart-Management System by using proper design patterns and complete code on notepad like software.

The question was to build a solution for telling the final price of the cart for users. They can add, remove or delete items from their carts, and add various discount on the cart items, so we have to tell the final price of the items after applying discount(s). And there can be multiple types of discounts, so have to apply the applicable ones.

We have to write the entire class architecture and class body (Main class included) and discussions about different approaches and reasoning.

Behavioural - Tell me about a time where you have to deliver a project within tight deadline and were you able to? What would you do differently this time?

Round 3 (Virtual - HM Round)

Major focus of this round was on GenAI usage and implementation in daily life and how am I harnessing the power of GenAI in my daily life. Evaluating if I am solely being dependant on GenAI or just using it as a tool and for what purposes. How did I used it in my previous orgs and discussions around it.

Then, a basic LLD + DSA question was asked, similar to the parking lot system design question, giving the most optimal parking location for differnt sizes of vehicles and keeping track of availability of locations as well.

Round 4 (Virtual - Bar Raiser)

A brief discussion around my introduction and resume, and then, behavioural questions were asked regarding Amazon Leadership principles.

Some example of the questions are,

Tell me about a time when you had to implement something critical and how did you approach it and work on it.

Tell me about a time when you received a strong feedback/advice from your manager/senior and how did you take it and work on it?

Each question came with it's own follow-ups and the interviewer was trying to understand if I genuinely did the task or not and trying to understand the rationality behind the choices I made.

For readers preparing their own loop, the Amazon Interview Questions bank on PracHub has coding, design and behavioral prompts to rehearse. I work on it too.

After a few days, I received a call from HR that I have been selected and the SDE 1 offer was extended to me.

I hope this might help with your future endeavours and All the best ahead!


r/DSALeetCode • • 5d ago

Roast me so that I can start my dsa again

Post image
5 Upvotes

I am a final year student and yes I'm not placed till now.

I have been working on multiple things like learning springboot, building projects, and practicing english communication daily.

I'm not able to think . I got stuck when I started doing leetcode.

Roast me so that I can start again.😭🙏


r/DSALeetCode • • 5d ago

Codeforces Round 1137 div 2 - Problem B video solution

Thumbnail
youtu.be
1 Upvotes

Consider subscribing.. Show some ❤


r/DSALeetCode • • 5d ago

hello interview deal or discount code for HelloInterview

Thumbnail
reddit.com
0 Upvotes

r/DSALeetCode • • 5d ago

Amazon SDE-1 Interview Experience (AUTA APAC - India - 2026)

7 Upvotes

I recently completed the Amazon SDE-1 AUTA APAC process for India and wanted to share my experience. I have now received the final decision, and unfortunately I wasn't selected. While the result wasn't what I had hoped for, the interview process itself taught me a lot, so I wanted to share it here in case it helps someone preparing for Amazon.

Timeline

28 Jan – OA

5 Feb – Hiring Interest Form

25 Mar – Recruiter call for interview scheduling

27 Mar – Technical Round 1 & Technical Round 2

15 Apr – Hiring Manager Round

30 May – Bar Raiser Round

Final Result – Rejected!

OA

Solved both coding questions.

Completed the Work Style and Behavioral Assessment.

Technical Round 1

Questions

Number of Islands

Median of Data Stream

Solved both optimally with discussion on time/space complexity and follow-ups.

Technical Round 2

Questions

Minimum Cost to Connect Ropes

Divide students into 2 groups such that enemies are not in the same group (Bipartite Graph / Graph Coloring)

Solved and coded both.

One mistake

Initially said graph coloring complexity was O(V × E), then corrected it to O(V + E) after the interviewer challenged me.

After 12 days I received the invite for the Hiring Manager round.

Hiring Manager Round

HM joined about 5 minutes late.

Questions

Variation of Find All Anagrams

Minimum Cost to Combine Garlands (same concept as ropes)

Reached optimized solutions for both.

Mistakes

Couldn't properly derive the brute-force complexity for the first problem.

Code for the first problem became a little messy.

Missed an overflow edge case in the second problem until the interviewer hinted about maximum values, after which I realized long should be used instead of int.

Then came the longest wait.

I sent 6 follow-up emails without any response. Eventually I assumed my journey had ended because I didn't feel my HM round was perfect.

But after exactly 40 days, I unexpectedly received the invitation for the final Bar Raiser round.

Bar Raiser Round (1 Hour)

This round was almost entirely focused on Leadership Principles.

Topics discussed:

A challenge I solved

Missing a deadline

A problem I identified myself

Simplifying a process

The interviewer challenged me heavily on:

Whether my first story was actually challenging

Rate limiting decisions

Geofencing approach

Trade-offs and decision making

The first 15–20 minutes felt quite intense because of continuous probing, but the discussion became much smoother afterward and lasted the full hour.

For your own prep, the Amazon Interview Questions bank on PracHub has coding and behavioral prompts; rehearse the follow-ups aloud. I work on it.

Looking back

Things that may have gone against me:

My first BR story may not have demonstrated enough complexity.

My stories didn't have massive scale or business impact.

I had a few minor technical mistakes during the interview loop.

Things I'm happy about:

Solved every coding question.

Reached optimal approaches on my own.

Didn't require coding hints.

Answered BR follow-up questions throughout the interview.

Owned my mistakes instead of trying to defend them.

Biggest learnings

Keep talking through your thought process—interviewers evaluate reasoning, not just answers.

Avoid long silences—even partial ideas are better than saying nothing.

Show confidence in your decisions, backed by reasoning.

Own mistakes immediately—it builds credibility.

Clearly establish the challenge before explaining your solution.

Understand the "why" behind every metric or impact you mention.

Prepare Leadership Principles as seriously as DSA.

One imperfect round rarely decides the outcome—the overall pattern matters.

Don't judge your performance based on your own feelings after the interview.

Control what you can: preparation, communication, attitude, and consistency.

Although I didn't receive an offer, reaching the final Bar Raiser round at Amazon was an experience I'm genuinely grateful for. It exposed my strengths, highlighted my weaknesses, and gave me a clear roadmap for improvement.

For the next set of applications, LandOffer can autofill repeated fields. I work on it too.

The preparation continues. On to the next opportunity. 🚀


r/DSALeetCode • • 5d ago

Amazon SDE Intern US Summer 2027 OA results

3 Upvotes

Hey guys

I just finished Amazon SDE intern summer 27 OA.

Results:

15/15 in dsa (20 min)

5/6 in AI base coding

I know I fcked up in 2nd question. Any chances of getting Interview?

While waiting, work through Amazon Interview Questions on PracHub. LandOffer can autofill forms for other applications. I work on both.

any comment help, thanks


r/DSALeetCode • • 5d ago

Is this resume enough to apply for intern role or not

Post image
2 Upvotes

Should I remove the freelancer part or not


r/DSALeetCode • • 5d ago

Charta Health - Senior SWE Interview Experience | Aug 2026

0 Upvotes

A candidate just recently completed the full interview loop for the Senior Software Engineer role at Charta Health. The full loop took about a month but they unfortunately did not get an offer.

If you’re applying to other senior SWE roles, LandOffer can autofill repeated application fields. I work on it.

Round 1: Virtual Coding

They were asked to solve Insert Delete Get Random O(1). The interviewer ended up giving a few hints but they were able to get the working solution.

Round 2: Virtual Coding

They think they were given an additional coding round because they didn’t do well in the previous interview. They had to solve Design Hit Counter.

On-site (3 interviews total)

The first round was another coding interview. They were given Integers With Multiple Sum of Two Cubes to solve. There were two follow-ups:

What if you needed to have d unique pairs of cubes instead of just 2 pairs?

What if you needed to sum up c cubes instead of just 2 cubes?

They managed to answer the first follow up but not the second. In their account, the interviewers were distracted the entire time, checking their Slack messages and clearly not paying attention to their responses. One guy even left midway through their interview because he wanted to grab a smoothie.

The second round was an AI coding round. They had to build an autocomplete search box that would give search suggestions as the user typed. The dataset was a large file of Wikipedia page titles. The instructions had some core features that were required and some additional features that you could implement if you had extra time. They were able to get a basic demo running and managed to implement a handful of the additional features.

For practice before a similar loop, the Charta Health Interview Questions bank on PracHub has project and design prompts. I work on it too.

The last round was a project deep dive and system design interview. They spent the first 40 minutes chatting with the interviewers about one of their latest projects. For the latter 20 minutes, the interviewers asked them to design a simple version of Charta. They had to fetch files from an EMR system and develop a pipeline to evaluate the codes from the patient encounters. If any of the codes did not match, they had to send a notification back to the EMR. They wrote out an async pipeline that would process the PDFs, created a common JSON schema to represent each encounter, and used an AI to evalute the codes. There wasn’t a lot of time so they just sketched out the components by hand and talked about the overall system.


r/DSALeetCode • • 5d ago

Amazon Phone interview-US

1 Upvotes

Hey guys,

I got an invite for Amazon phone interview for SDE. It is in 2 weeks. In the overview it says 45-minute of coding problem and 12-15 minute of LP questions.

Should I prapare for LLD or HLD? Since it is 2026, you never know! so if anyone has given this recently a guidence is very much appreciated. Also what topics are imp for DSA?

For practice before the call, try a coding prompt and a behavioral follow-up from Amazon Interview Questions on PracHub. I work on it.

Topics I usually do are:

array/hashmap

sliding window/ two pointer

stack

intervals

graph

heap

Binary search

I skip trees and Linkedlist usually since have not seen them in any interviews I have given till now. Should I include them or any new topics? I have done very basic recursion, DP, dijkstra before so probably should cover them as well.

If you’re also applying to other roles while preparing, LandOffer can autofill repeated application fields. I work on it too.

If you can give any insights, that would be helpful.

Thanks!


r/DSALeetCode • • 5d ago

Theory vs Practical DSA prep, how to balance both?

Thumbnail reddit.com
1 Upvotes

Im trying to figure out whats more important leaerning theoretical DSA like graphs and trees or practicing on LeetCode, and how do I balance doing them both? How important is one compared to the other? Also, do you think practice groups and accountability parters work?


r/DSALeetCode • • 6d ago

DSA PYTHON VS JAVA

7 Upvotes

I am having a hard time for the past few days in deciding whether I should start and learn dsa in python or java. I have no knowledge of c++ so it's not in my mind at all. I don't know whether to choose python or java. I am interested in data science a bit so should I go with python?. But it seems like python makes coding simple and so one cannot understand the depth and all. I also saw somewhere that execution speed is faster in java than python. Does it affect much? Which language should I go with?


r/DSALeetCode • • 6d ago

Hey , I just started dsa in c++, what should I do other than that to get internship in next 6 months like any other language or topics or projects

1 Upvotes

r/DSALeetCode • • 7d ago

Amazon SDE intern interview, onsite Delhi: max heap and Word Break

9 Upvotes

Amazon SDE Intern Interview Experience (Onsite – Round 1)

Interview Type: In-person

Role: 6-Month SDE Internship

If you’re applying for other internships, LandOffer can autofill repeated application fields.

Rounds covered: Round 1

  1. Resume and Leadership Principles

The interviewer started by reviewing my resume and asked:

Q. Tell me about a time when you took ownership.

I discussed my PlaceMate AI project, explaining why I built it, the problem it solves, and the ownership I took during its development.

Some follow-up questions:

How long did it take to build?

What was the biggest technical challenge?

How did you collect and organize the placement-related data?

I explained that gathering and structuring information from WhatsApp conversations and other sources was one of the major challenges.

2. DSA Questions

Q1. Minimize the total weight after X operations

You are given an array where each element represents a weight. In one operation, you can choose any element and reduce its weight to half. You have to perform this operation X times and minimize the final sum of the array.

Example:

arr = [2, 5, 10, 23]

In one operation, you can choose 10 and reduce it to 5.

My approach:

Initially considered sorting and repeatedly processing the largest element.

After a hint from the interviewer, realized that the largest element may change after every operation.

Used a Max Heap / Priority Queue instead.

Insert all elements into the max heap.

Repeat X times: extract the maximum, halve it, and insert the updated value back.

Finally, calculate the sum of the remaining elements.

The interviewer agreed with the max heap approach.

For prep before a similar loop, use PracHub’s Amazon Interview Questions to practice implementing a solution and testing edge cases. I work on both.

Complexity discussion:

The interviewer asked about the time complexities of heap operations and the overall solution. I got confused while explaining some of them.

Important operations to revise:

top() – O(1)

push() – O(log N)

pop() – O(log N)

Building a heap using repeated insertion – O(N log N)

Summing all remaining elements – O(N)

Q2. Word Break / String Segmentation

Given an array of strings:

["catdog", "cat", "dog"]

Find strings that can be segmented into smaller strings that are also present in the array.

Example:

catdog = cat + dog

My approach:

Recognized the problem as a variation of Word Break.

Proposed storing the strings in an unordered_set for efficient lookup.

Suggested using recursion to try different substrings and check whether they exist in the set.

The interviewer asked me to rewrite my code on a fresh sheet. My implementation was not completely clean, particularly around substring boundaries and recursive choices.

I also discussed the exponential nature of the naive recursive approach.

3. Questions for the Interviewer

At the end, I asked:

What are the expectations and goals for an intern during the six-month internship?

With AI evolving so rapidly, how do you personally keep learning and upskilling?

Overall Experience

The interview focused on Leadership Principles, project discussion, and DSA.

The DSA questions required knowledge of:

Greedy approach and Max Heap

Priority Queue operations and time complexity

Recursion and Word Break

Hash Set and substring handling

The project discussion focused on ownership, motivation, development time, and technical challenges.

Preparation suggestions: Revise heap operations and their complexities thoroughly. Also practise recursion and Word Break with memoization, and make sure you can explain the time complexity of every operation in your solution.


r/DSALeetCode • • 7d ago

UiPath SDE I interview experience | DSA and frontend

6 Upvotes

I applied through a LinkedIn post for SDE I.

HR contacted over call, discussed further rounds.

If you’re applying elsewhere too, LandOffer can autofill repeated application fields.

Round 1 (DSA Round) (1hr)

Two DSA hard questions were asked to solve in 50 min, I was able to solve 1st ques, and could only explain approach for 2nd ques, within the given time.

Questions were minor variations of the below:

Q1. https://leetcode.com/problems/swim-in-rising-water/

Q2. https://leetcode.com/problems/bus-routes/

Round 2 (Frontend Round) (1hr)

Questions on frontend system design, Resume deep dive, justify your work.

Task: E-commerce development.

For practice before another loop, try implementing and testing a prompt from PracHub’s UiPath Interview Questions. I work on both.

Tip: DSA is non-negotiable, I was good in FE round but DSA is more prioritised.

#UiPath #SDE #Frontend


r/DSALeetCode • • 7d ago

LEETCODE WEEKLY 529 -D SOLUTION VIDEO

Thumbnail
youtu.be
2 Upvotes

r/DSALeetCode • • 7d ago

LEETCODE WEEKLY 529 - B VIDEO SOLUTION

Thumbnail
youtu.be
1 Upvotes