Upload Button Icon Add office photos

ThoughtWorks

Compare button icon Compare button icon Compare

Filter interviews by

Clear (1)

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 was interviewed 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 was interviewed 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

TCS user image Anonymous

posted on 16 Sep 2021

I was interviewed in Sep 2020.

Round 1 - Coding Test 

(1 Question)

Round duration - 180 minutes
Round difficulty - Hard

Timing: 8 a.m. to 11a.m.
Environment was optimum.
No significant activity.

  • Q1. 

    Edit Distance Problem Statement

    Given two strings S and T with lengths N and M respectively, your task is to find the "Edit Distance" between these strings.

    The Edit Distance is defined as the minimum nu...

  • Ans. 

    The task is to find the minimum number of operations required to convert one string into another using delete, replace, and insert operations.

    • Use dynamic programming to solve the problem efficiently.

    • Create a 2D array to store the minimum edit distance for substrings of the two input strings.

    • Iterate through the strings and update the array based on the operations needed for each character.

    • Return the value in the bottom ...

  • Answered by AI
Round 2 - Video Call 

Round duration - 30 minutes
Round difficulty - Medium

Timing: 12:00 p.m. to 12:30 p.m.
The environment was quite good.
No significant activity.
Interviewers were very friendly. They were behaving like friends.

Round 3 - HR 

Round duration - 15 minutes
Round difficulty - Easy

Timing: 3:00 p.m. to 3:20 p.m.
Environment was very good.
No significant activity was monitored.
HR was very good and friendly.

Interview Preparation Tips

Professional and academic backgroundI completed Civil Engineering from Heritage Institute of Technology. I applied for the job as SDE - 2 in KolkataEligibility criteriaAbove 6.5 CGPATata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - Data Structures, Dynamic Programming, OOPS, Computer Networks, System DesignTime required to prepare for the interview - 7 monthsInterview preparation tips for other job seekers

Tip 1 : Do minimum 3 projects
Tip 2 : Prepare every topic of DSA for interview
Tip 3 : Hands on experience in performing MySql commands

Application resume tips for other job seekers

Tip 1 : Be precise and don't bluff
Tip 2 : Learn atleast 2 programming languages
Tip 3 : Do projects on latest technologies like Artificial Intelligence and Machine Learning

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 was interviewed 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

SDE-2 Interview Questions & Answers

TCS user image Anonymous

posted on 15 Sep 2021

I was interviewed before Sep 2020.

Round 1 - Coding Test 

(1 Question)

Round duration - 360 minutes
Round difficulty - Hard

Timing- Any 6 hours of my choice in the 24 hour window. (10:00 p.m. to 4:00 a.m. I selected)
Environment was very friendly and easy to use.
No significant activity.
This was the only coding round.

  • Q1. 

    Prime Time Again Problem Statement

    You are given two integers DAY_HOURS and PARTS. The integer 'DAY_HOURS' represents the number of hours in a day, and the day can be divided into 'PARTS' equal parts. You...

  • Ans. 

    Find total instances of equivalent prime groups in a day divided into equal parts.

    • Iterate through each part of the day and check for prime pairs in different parts

    • Use a helper function to check if a number is prime

    • Ensure the day is evenly divided by parts and each prime group has hours from different parts

  • Answered by AI
Round 2 - Telephonic Call 

Round duration - 10-15 minutes
Round difficulty - Easy

Timing- 12:15 p.m. 
Environment was very good .
Not any significant activity.
The interviewer was very friendly and talked like friends.

Round 3 - HR 

Round duration - 20 minutes
Round difficulty - Medium

Timing- 12:30 p.m. to 12:45 p.m
Environment was very comfortable.
No other significant activity.
Interviewer was very good and talking very politely & friendly.

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from D Y Patil School Of Engineering Academy,Ambi.. I applied for the job as SDE - 2 in PuneEligibility criteriaAbove 6.75 CGPA, No running backlogsTata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - DBMS, Sorting Algorithms, SDLC, Computer Networks, Basics of DSATime required to prepare for the interview - 2 monthsInterview preparation tips for other job seekers

Tip 1 : Make sure what you have learnt in DSA you can do it practically by writing codes.
Tip 2 : Must have a hands-on experience in writing SQL commands.
Tip 3 : Do atleast 3-4 projects so that you have an option to explain any one of them if the interviewer asks.

Application resume tips for other job seekers

Tip 1 : Write only true data in resume. Don't bluff as you may get caught which will be very embarrassing.
Tip 2 : Have some latest technology related projects in your resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

SDE-2 Interview Questions & Answers

TCS user image Anonymous

posted on 16 Sep 2021

I was interviewed in Dec 2020.

Round 1 - Coding Test 

(1 Question)

Round duration - 30 minutes
Round difficulty - Medium

It was in the morning about 10:00AM-10:40AM. The platform used for this round was hackerrank. There are 15 MCQ's which cover portions of Aptitude, Data Structures, DBMS, SQL

  • Q1. 

    Minimum Operations Problem Statement

    You are given an array 'ARR' of size 'N' consisting of positive integers. Your task is to determine the minimum number of operations required to make all elements in t...

  • Ans. 

    Minimum number of operations to make all elements in the array equal by performing addition, subtraction, multiplication, or division.

    • Iterate through the array to find the maximum and minimum values.

    • Calculate the difference between the maximum and minimum values.

    • The minimum number of operations needed is the difference between the maximum and minimum values.

  • Answered by AI
Round 2 - HR 

Round duration - 15 minutes
Round difficulty - Easy

It was in the night around 7:00PM-7:20PM. Platform used for this round was skype. Interviewer was very serious while taking my interview.

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 2 in DelhiEligibility criteriaAbove 7 CGPATata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, OOPS, Data Science, Aptitude, DBMSTime required to prepare for the interview - 3.5 monthsInterview preparation tips for other job seekers

Tip 1 : Practice as much as you can
Tip 2 : Try to get a good hold in Data Structures
Tip 3 : Do atleast 2 projects

Application resume tips for other job seekers

Tip 1 : It should not be too long or too short.
Tip 2 : Each skill should be mentioned properly.

Final outcome of the interviewSelected

I was interviewed before Sep 2020.

Round 1 - Coding Test 

(1 Question)

Round duration - 140 minutes
Round difficulty - Medium

Test timing was at 2:00 pm , it was conducted in a college and the environment was good for the test. Camera was a primary part of test, so no suspicious activity.

  • Q1. 

    Sum of Two Numbers Represented as Arrays

    Given two numbers in the form of two arrays where each element of the array represents a digit, calculate the sum of these two numbers and return this sum as an ar...

  • Ans. 

    Given two numbers represented as arrays, calculate their sum and return the result as an array.

    • Iterate through the arrays from right to left, adding digits and carrying over if necessary

    • Handle cases where one array is longer than the other by considering the remaining digits

    • Ensure the final sum array does not have any leading zeros

  • Answered by AI
Round 2 - Face to Face 

Round duration - 20 minutes
Round difficulty - Easy

The round was conducted at around 12 p.m. I was called at the college location and then it was conducted. The interviewer was quite polite and frank.

Round 3 - HR 

Round duration - 8 minutes
Round difficulty - Easy

This round was conducted right after finishing and clearing the technical round at the same place and on the same day.

Interview Preparation Tips

Eligibility criteriaAbove 60 %Wipro Limited interview preparation:Topics to prepare for the interview - OOPS, Data Structures, Database Concepts, Coding problemsTime required to prepare for the interview - 2-3 monthsInterview preparation tips for other job seekers

Tip 1 : Practice atleast 2-3 Coding problems daily so your logic building becomes stronger.
Tip 2 : Exercise problems based on OOPS concepts and others too.
Tip 3 : If you can have your own project built, then it's the major point and will act as a plus point.

Application resume tips for other job seekers

Tip 1 : Your resume should be in standard form, short and simple will be more effective.
Tip 2 : Whatever you have learned, you need to mention it in your resume as that will be your primary source of selection and having project on your resume is important.

Final outcome of the interviewSelected

Skills evaluated in this interview

I applied via Naukri.com and was interviewed in Jul 2020. There were 4 interview rounds.

Interview Questionnaire 

1 Question

  • Q1. SOLID principals, oops, c# basics, SQL server, azure, design pattern

Interview Preparation Tips

Interview preparation tips for other job seekers - Clear basics of oops and design pattern

I applied via Walk-in and was interviewed before May 2020. There was 1 interview round.

Interview Questionnaire 

1 Question

  • Q1. Add your question

Interview Preparation Tips

Interview preparation tips for other job seekers - Share your interview advice and tips

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 .
Contribute & help others!
anonymous
You can choose to be anonymous

Recently Viewed

DESIGNATION

INTERVIEWS

Xoriant

No Interviews

DESIGNATION

JOBS

Cognizant

No Jobs

JOBS

Deloitte

No Jobs

INTERVIEWS

Atul

No Interviews

DESIGNATION

INTERVIEWS

Altimetrik

No Interviews

DESIGNATION

DESIGNATION

Tell us how to improve this page.

Interview Questions from Similar Companies

TCS Interview Questions
3.7
 • 10.4k Interviews
Infosys Interview Questions
3.6
 • 7.5k 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
 • 791 Interviews
Synechron Interview Questions
3.5
 • 362 Interviews
View all
Senior Consultant
696 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Application Developer
658 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Lead Consultant
248 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Consultant
151 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Software Developer
100 salaries
unlock blur

₹0 L/yr - ₹0 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
Rate your experience using AmbitionBox
Terrible
Terrible
Poor
Poor
Average
Average
Good
Good
Excellent
Excellent