Practice
Data Structures and Algorithms
Machine Coding Round (LLD)
System Design & Architecture (HLD)
Frontend UI Machine Coding
Resources
Career Advice and Roadmaps
Data Structures and Algorithms
Machine Coding Round (LLD)
System Design & Architecture (HLD)
Backend Development
Frontend Development
Project Ideas for Software Developers
Core Computer Science
Companies
SDE Jobs & Internships
Interview Questions
Compare Companies
IDE
Online IDE
Collaborative IDE

How to prepare for the Problem Solving, Data Structures and Algorithms Interview Round?

Gaurav Chandak
Gaurav Chandak
Disclaimer: This article was written few years ago and may no longer be relevant as software engineering has changed a lot in the last few years. This is what may be more relevant now: Future of Software Engineering - Gaurav Chandak

If you’ve never heard of PS/DS (Problem Solving, Data Structures and Algorithms) round before, please go through our article on ‘What is a PS/DS Round?’ to understand more about it.

Given that almost all of the tech companies majorly hire through PS/DS coding interviews, it is extremely important to prepare for it if you aim to get a job as a software engineer. Although most candidates prepare for it, the rejection rate is pretty high.

Let’s look at the primary things you need to work on to crack the PS/DS round:

Get comfortable with coding

To do well in a PS/DS interview, you should be extremely comfortable with coding. During the interview, you are supposed to write a bug-free code pretty fast after thinking about and discussing the solution. You should aim to get so comfortable in coding that if you’re told the high-level solution, you should be able to code it without much thinking. You should also learn how to calculate the time and space complexity of a solution.

Competitive programming (CP) on platforms like SPOJ, CodeChef, Codeforces, etc is a really interesting and exciting way to get comfortable with coding. But if you’ve put in a lot of effort on CP but it still didn’t work out, it is totally fine.

Start with 'Basic programming problems' and start coding the solutions of the problems mentioned. Try to solve all the 50 questions. This should help you get some comfort with coding. You can try CP now if you feel confident and if you’ve time.

Learn data structures and algorithms

The PS/DS round is centered around data structures and algorithms and so that is something that you should learn very well. Try to understand the basic concepts related to different data structures and algorithms instead of just looking at past problems. You should be able to solve most of the questions that you will likely encounter during the interview if you work on the basic concepts.

The most common data structures that you should master are Array, Linked List, Stack, Queue, HashMap, Tree, Graph and Heap.

The most common types of algorithms are String Manipulation, Two Pointers, Searching, Sorting, Backtracking, Bit Manipulation, and Dynamic Programming.

Some of these might seem difficult at first but if you want to crack the interview at the top tech companies, you should spend more time on what you find difficult and master each of these.

Practice

One needs to practice to become good at anything, and this is no different. You should spend most of the time coding while preparing for the PS/DS interview. While learning a particular DS/Algo, try to implement them with related functionalities followed by problems where you’re supposed to use that particular DS/Algo.

You can find a lot of topic-wise practice problems on websites like workat.tech, LeetCode, InterviewBit, HackerRank, and HackerEarth. Make sure to spend a lot of time trying to solve the problem yourself. Go through the basics again, if required. Google for the solution only if you’re stuck for long and are not able to get anywhere close to the solution.

Writing on a shared code editor or whiteboard or paper in an interview setting is very different from writing in an IDE in a comfortable environment and so practicing to code that way as well could be extremely helpful.

In an actual interview, you’ll most likely encounter a new problem and so you should be confident enough to be able to solve unknown problems. Putting in a lot of effort during the practice session may help you get that confidence. Focus on mastery through practice rather than focusing on being acquainted with expected interview questions.

You may also want to give a few mock interviews to get comfortable with interviewing through a simulated interview setting. There are a few websites like Pramp and InterviewBit which give you an option to do peer-to-peer mock interviews.

After preparing for the PS/DS round, please go through ‘How to ace the PS/DS (coding) round?’ to understand what to do and what not to do during the actual interview.

1
Gaurav Chandak
Gaurav Chandak
Gaurav is the co-founder of workat.tech and has previously worked at Flipkart and Microsoft. He intends to actively contribute to the future of education through workat.tech.
Related Content
SDE 1 Interview Preparation Roadmap for Product-Based Companies
How to ace the Problem Solving, Data Structures and Algorithms Interview Round?
How to prepare for machine coding round? - Interviews | Flipkart, Uber, Swiggy, Udaan
SDE Bootcamp - Become a software engineer at a product-based company
Practice Data Structures & Algorithms
Learning Resources
Interview Prep Resources
Blog
  • Career Advice and Roadmaps
  • Data Structures & Algorithms
  • Machine Coding Round (LLD)
  • System Design & Architecture
  • Backend Development
  • Frontend Development
  • Awesome Project Ideas
  • Core Computer Science
Practice Questions
  • Machine Coding (LLD) Questions
  • System Design (HLD) Questions
  • Topic-wise DSA Questions
  • Company-wise DSA Questions
  • DSA Sheets (Curated Lists)
  • JavaScript Interview Questions
  • Frontend UI Machine Coding Questions
Online Compilers (IDE)
  • Online Java Compiler
  • Online C++ Compiler
  • Online C Compiler
  • Online Python Compiler
  • Online JavaScript Compiler
Topic-wise Problems
  • Dynamic Programming Interview Questions
  • Linked List Interview Questions
  • Graph Interview Questions
  • Backtracking Interview Questions
  • Arrays Interview Questions
  • Trees Interview Questions
Company-wise Problems
  • Amazon Interview Questions
  • Microsoft Interview Questions
  • Google Interview Questions
  • Flipkart Interview Questions
  • Adobe Interview Questions
  • Facebook Interview Questions
DSA Sheets (Curated Lists)
  • Top Interview Questions
  • FAANG Interview Questions
  • Most Asked Interview Questions
  • 6 month DSA Practice Sheet
  • 3 month DSA Practice Sheet
  • Last minute DSA Practice Sheet