Upload Button Icon Add office photos

ThoughtWorks

Compare button icon Compare button icon Compare

Filter interviews by

ThoughtWorks SDE-2 Interview Questions and Answers

Updated 31 May 2022

ThoughtWorks SDE-2 Interview Experiences

1 interview found

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 31 May 2022

I appeared for an interview in Feb 2022.

Round 1 - Coding Test 

(3 Questions)

Round duration - 90 Minutes
Round difficulty - Easy

In this round, there are a total of 16 questions and the time given was 90 mins.

3 Coding questions – Easy, Medium, and Hard.
13 MCQs based on outputs, Computer fundamentals, Aptitude.

  • Q1. 

    N Queens Problem Statement

    You are provided with an integer 'N'. For an 'N' x 'N' chessboard, determine how to position 'N' queens such that no queen can attack another queen on the chessboard.

    Explanati...

  • Ans. 

    The N Queens problem involves placing N queens on an N x N chessboard so that no two queens can attack each other.

    • Use backtracking to explore all possible configurations of queen placements.

    • Keep track of rows, columns, and diagonals to ensure no two queens are attacking each other.

    • Print all valid configurations of queen placements.

  • Answered by AI
  • Q2. 

    Pair Sum Problem Statement

    Given an integer array ARR of size N and an integer S, your goal is to return a list of all pairs of elements such that the sum of elements of each pair equals S.

    Example:

    Inp...
  • Ans. 

    Return pairs of elements in an array whose sum equals a given integer.

    • Iterate through the array and store elements in a hashmap.

    • For each element, check if the complement (S - current element) exists in the hashmap.

    • Return pairs that satisfy the condition, sorted as per the given rules.

  • Answered by AI
  • Q3. 

    Minimum Number of Platforms Needed Problem Statement

    You are given the arrival and departure times of N trains at a railway station for a particular day. Your task is to determine the minimum number of pl...

  • Ans. 

    Determine the minimum number of platforms needed at a railway station based on arrival and departure times of trains.

    • Sort the arrival and departure times in ascending order.

    • Use two pointers to keep track of overlapping schedules.

    • Increment platform count when a new train arrives before the previous one departs.

  • Answered by AI
Round 2 - Coding Test 

Round duration - 120 minutes
Round difficulty - Easy

This round is an interesting experience to brainstorm, problem-solve and pair alongside a ThoughtWorks Developer that allows you to demonstrate hands-on coding, design, OOP, and solution skills on the code which you have submitted.The problem statement will be shared with you 20 minutes before the start time of the interview

Interview Preparation Tips

Eligibility criteriaNAThought Works interview preparation:Topics to prepare for the interview - Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic ProgrammingTime required to prepare for the interview - 2 monthsInterview preparation tips for other job seekers

Tip 1 : Prepare system design
Tip 2 : Practice coding questions
Tip 3 : Prepare and search previous interviews

Application resume tips for other job seekers

Tip 1 : Have atleast 3 great project
Tip 2 : Write only what you know and prepare well

Final outcome of the interviewRejected

Skills evaluated in this interview

Interview questions from similar companies

I appeared for an interview before May 2021.

Round 1 - Telephonic Call 

(1 Question)

Round duration - 30 minutes
Round difficulty - Medium

  • Q1. 

    Remove Consecutive Duplicates Problem Statement

    Given a string S, your task is to recursively remove all consecutive duplicate characters from the string.

    Input:

    String S

    Output:

    Output string

    Constr...

  • Ans. 

    Recursively remove consecutive duplicate characters from a string.

    • Use recursion to check if the current character is the same as the next character, if so, skip the next character

    • Base case: if the string is empty or has only one character, return the string

    • Recursive case: if the current character is the same as the next character, call the function recursively with the string excluding the next character

  • Answered by AI
Round 2 - Face to Face 

(1 Question)

Round duration - 90 minutes
Round difficulty - Easy

  • Q1. 

    Reverse String Operations Problem Statement

    You are provided with a string S and an array of integers A of size M. Your task is to perform M operations on the string as specified by the indices in array A...

  • Ans. 

    Perform a series of reverse string operations on a given string based on specified indices.

    • Iterate through the array of indices and reverse the substring of the string based on the given indices.

    • Ensure to reverse the substring from the starting index to len(S) - starting index - 1.

    • Continue the operations in the sequence specified by the array of indices to get the final string.

  • Answered by AI
Round 3 - HR 

Round duration - 50 minutes
Round difficulty - Medium

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in BangaloreEligibility criteria60%Tech Mahindra interview preparation:Topics to prepare for the interview - Java, Data Structures, Oops Concept, Angular, Basic fundamental of Computer ScienceTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Prepare well for resume & confidence for basic part of CS.
Tip 2 : Good knowledge of skills set which mentioned in CV.
Tip 3 : Explain about projects which you have worked earlier & your roles and responsibilities.

Application resume tips for other job seekers

Tip 1 : Mentioned all the skills & certificate till date update your resume every 3 month's. 
Tip 2 : Proper skills set with project explanation and duration of project which you have worked on

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

Mphasis user image Anonymous

posted on 17 Dec 2021

I appeared for an interview in Aug 2021.

Round 1 - Video Call 

(3 Questions)

Round duration - 45 minutes
Round difficulty - Medium

Technical Interview round that lasted for about 45 minutes. Questions were based on Java, Java design Patterns and OOPS Concepts.

  • Q1. What are static methods in interfaces?
  • Ans. 

    Static methods in interfaces are methods that can be called without creating an instance of the interface implementation.

    • Static methods in interfaces were introduced in Java 8.

    • They are used for providing utility methods that are related to the interface but do not require an instance of the implementing class.

    • Static methods in interfaces cannot be overridden by implementing classes.

    • Example: interface MyInterface { stat...

  • Answered by AI
  • Q2. Why was a new version of Java (Java 8) needed in the first place?
  • Ans. 

    Java 8 was needed to introduce new features like lambda expressions, streams, and default methods.

    • Introduction of lambda expressions for functional programming

    • Streams API for processing collections in a functional style

    • Default methods in interfaces for backward compatibility

    • Improved performance with the introduction of the Nashorn JavaScript engine

    • Date and Time API for better handling of date and time operations

  • Answered by AI
  • Q3. In how many ways can you create a singleton pattern in Java?
  • Ans. 

    There are multiple ways to create a singleton pattern in Java, including using static initialization, lazy initialization, and enum.

    • Using static initialization: Create a private static instance of the class and a public static method to return that instance.

    • Lazy initialization: Create a private static instance of the class and a public static method to check if the instance is null before creating it.

    • Using enum: Create...

  • Answered by AI
Round 2 - Video Call 

(4 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Technical Interview round that lasted for about 45 minutes. Questions were based on Spring boot and Microservices Concepts.

  • Q1. What is the difference between the Bridge Pattern and the Adapter Pattern in Java?
  • Ans. 

    Bridge Pattern decouples abstraction from implementation, while Adapter Pattern adapts an interface to another.

    • Bridge Pattern separates abstraction and implementation using composition, while Adapter Pattern adapts an interface to another without changing its original structure.

    • Bridge Pattern allows for changes in both abstraction and implementation independently, while Adapter Pattern allows incompatible interfaces to...

  • Answered by AI
  • Q2. What is the difference between @RestController and @Controller in Spring Boot?
  • Ans. 

    Difference between @RestController and @Controller in Spring Boot

    • 1. @Controller is used to create web MVC controllers while @RestController is used to create RESTful web services.

    • 2. @Controller returns the view to be rendered while @RestController returns the object and data is written directly to the HTTP response as JSON or XML.

    • 3. @RestController is a specialized version of @Controller that includes @Controller and @...

  • Answered by AI
  • Q3. What is the difference between Spring and Spring Boot?
  • Ans. 

    Spring is a framework for building Java applications, while Spring Boot is an extension that simplifies the setup and configuration.

    • Spring is a comprehensive framework for building Java applications, providing features like dependency injection, aspect-oriented programming, and more.

    • Spring Boot is an extension of the Spring framework that aims to simplify the setup and configuration of Spring applications.

    • Spring Boot i...

  • Answered by AI
  • Q4. What is the difference between Monolithic and Microservices Architecture?
  • Ans. 

    Monolithic architecture is a single-tiered software application where all components are tightly coupled, while microservices architecture is a distributed approach where the application is broken down into smaller, loosely coupled services.

    • Monolithic architecture has a single codebase and database, while microservices have multiple smaller services with their own codebase and database.

    • Monolithic applications are harde...

  • Answered by AI
Round 3 - HR 

(1 Question)

Round duration - 30 minutes
Round difficulty - Easy

This was a typical HR round with some standard Behavioral questions

  • Q1. Why should we hire you?

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAMphasis interview preparation:Topics to prepare for the interview - Java, Spring Boot Framework, Data Structures, Algorithms, System Design, OOPSTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

I applied via Naukri.com and was interviewed before May 2021. There was 1 interview round.

Round 1 - One-on-one 

(1 Question)

  • Q1. Discuss 4 case study related to supply chain management.

Interview Preparation Tips

Topics to prepare for Tech Mahindra Senior Software Engineer interview:
  • Supply Chain Management
Interview preparation tips for other job seekers - Develop some case study of your own and also deep analysis for each.

I applied via Campus Placement and was interviewed before Feb 2020. There were 4 interview rounds.

Interview Questionnaire 

1 Question

  • Q1. Hr

Interview Preparation Tips

Interview preparation tips for other job seekers - You should be true to what you are putting before the interviewer . Try to put your ideas Add something you did well in your career like in projects /research which you know very well and versed in concepts about it for open interview so that interviewer can get bandwidth where he can ask questions from. This is simply a key .

I applied via Recruitment Consultant and was interviewed before Aug 2020. There was 1 interview round.

Interview Questionnaire 

1 Question

  • Q1. Tell me about yourself

Interview Preparation Tips

Interview preparation tips for other job seekers - Don't tell what is written in your CV.

I applied via Campus Placement and was interviewed before Aug 2021. There were 2 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Coding Test 

Easy DSA questions and some questions on resume

Interview Preparation Tips

Interview preparation tips for other job seekers - Don't join if you are a fresher and want to grow as a developer. I had resigned that time I am writing this review

I applied via Campus Placement and was interviewed in Mar 2020. There was 1 interview round.

Interview Questionnaire 

1 Question

  • Q1. How do you get the second to last element from a SQL table?
  • Ans. 

    To get the second to last element from a SQL table, use the OFFSET-FETCH clause.

    • Use the ORDER BY clause to sort the table in descending order.

    • Use the OFFSET-FETCH clause to skip the last row and fetch the second to last row.

    • Example: SELECT column_name FROM table_name ORDER BY column_name DESC OFFSET 1 ROWS FETCH NEXT 1 ROWS ONLY;

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Practice by building a simple full stack web application.

Skills evaluated in this interview

Interview Questionnaire 

1 Question

  • Q1. About the SDLC

Interview Preparation Tips

Interview preparation tips for other job seekers - Very nice

I applied via Naukri.com and was interviewed in Jun 2019. There were 3 interview rounds.

Interview Questionnaire 

2 Questions

  • Q1. Configuration Management, data modelling, CI relationships, Problem management process flow, SIAM, integration, cmdb reports, KPIs.
  • Q2. General introduction, projects handled in the past,

Interview Preparation Tips

Interview preparation tips for other job seekers - Stick to what u have worked on in your resume, ask about offered profile,

Tell us how to improve this page.

Interview Questions from Similar Companies

TCS Interview Questions
3.7
 • 10.5k Interviews
Infosys Interview Questions
3.6
 • 7.6k Interviews
Wipro Interview Questions
3.7
 • 5.6k Interviews
Tech Mahindra Interview Questions
3.5
 • 3.8k Interviews
HCLTech Interview Questions
3.5
 • 3.8k Interviews
LTIMindtree Interview Questions
3.8
 • 2.9k Interviews
Mphasis Interview Questions
3.4
 • 797 Interviews
Synechron Interview Questions
3.5
 • 363 Interviews
View all
Senior Consultant
721 salaries
unlock blur

₹11.1 L/yr - ₹37 L/yr

Application Developer
646 salaries
unlock blur

₹6.8 L/yr - ₹19 L/yr

Lead Consultant
248 salaries
unlock blur

₹23 L/yr - ₹65 L/yr

Consultant
163 salaries
unlock blur

₹8 L/yr - ₹21.8 L/yr

Software Developer
108 salaries
unlock blur

₹6 L/yr - ₹22 L/yr

Explore more salaries
Compare ThoughtWorks with

TCS

3.7
Compare

Infosys

3.6
Compare

Wipro

3.7
Compare

HCLTech

3.5
Compare
Did you find this page helpful?
Yes No
write
Share an Interview