Thoughtworks interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Thoughtworks
upvote
share-icon
4 rounds | 15 Coding problems

Interview preparation journey

expand-icon
Journey
Everything on my journey to securing this job began in my first year of B.Tech, when I developed a strong interest in web development. During that time, I learned a lot and worked on several projects that gave me practical experience with technologies such as HTML, CSS, and JavaScript. However, in my second year, I discovered my real interest in Python and decided to make it my primary programming language. I created several projects using Python and Flask, which helped solidify my skills. In my third year, I focused on Data Structures and Algorithms (DSA), practicing consistently to improve my problem-solving abilities. My DSA journey had actually begun in my second year with small daily problem-solving sessions, but I intensified my efforts in the third year. By my final year, I was working as a QA Intern at a company, gaining real-world experience in testing and software quality assurance. Around the same time, my college placement cell brought this opportunity, and since I was already familiar with the company, I decided to apply. With the skills and experience I had gained over the years, I successfully cleared the selection process and secured the job.
Application story
I applied for this opportunity through my college placement cell after learning about the opening. Since I was already familiar with the company, I was eager to apply. The process began with an initial resume screening, followed by multiple rounds, including an online assessment, a code-pairing round, a technical interview, and HR discussions. The entire journey was smooth and well-structured.
Why selected/rejected for the role?
I was selected for this role because of my strong problem-solving skills, hands-on project experience, and solid understanding of DSA and Python. My previous internship as a QA intern also provided me with practical exposure, which helped me stand out. Additionally, my ability to explain concepts clearly, think logically under pressure, and present real-world projects played a key role in my selection. This journey taught me that consistent practice, real-world application, and a well-structured resume can make a significant difference in securing a job.
Preparation
Duration: 3 months
Topics: Object-Oriented Programming (OOP), Data Structures and Algorithms, Database Management System (DBMS), Computer Networks, Version Control Systems (Git), System Design
Tip
Tip

Tip 1: Practice your programming skills by setting time limits.

Tip 2: Your projects should not seem forced; they should be creative and solve real-world problems.

Tip 3: Build a portfolio to showcase all your projects, internships, and skills.

Tip 4: Focus on Data Structures and Algorithms (DSA).

Tip 5: Prepare programming questions from https://www.naukri.com/code360/problems.

Application process
Where: Campus
Eligibility: 80% in Classes 10 and 12, and above 8 CGPA in undergraduate studies. (Salary Package: 11.10 LPA)
Resume Tip
Resume tip

Tip 1: Use proper formatting and consider building your resume using the LaTeX coding language.

Tip 2: Keep your resume clear and concise—avoid fancy fonts, colors, or unnecessary design elements that may distract from the content.

Tip 3: Showcase your projects and internships with brief descriptions, tech stacks, and impact-driven results.

Tip 4: If you are a fresher, keep it within one page (unless you have significant experience) and ensure there are no grammatical or formatting errors.

Tip 5: Add links to your GitHub, LinkedIn, or portfolio website to demonstrate your practical experience.

Interview rounds

01
Round
Easy
Online Coding Test
Duration90 minutes
Interview date29 Jan 2025
Coding problem3

The placement drive was conducted over two days. On January 29, 2025, the online assessment took place on the college premises from 4 PM to 5:30 PM. The results were announced the next day, and on January 31, 2025, all subsequent rounds were conducted at another college, as a total of four colleges were participating. The interview rounds were held from 9 AM to 6 PM.

The environment was competitive yet well-organized, and one thing that stood out to me was the strong collaboration among all the employees of the company. The interviewers were professional, supportive, and focused on assessing logical thinking and problem-solving skills.

1. Form The String

Hard
0/120

Sara has a main string and a list of N available substrings, each with an associated cost. Her goal is to construct the main string by concatenating some of the available substrings, aiming for the minimum possible total cost.


The rules are as follows:


1) Cost: The total cost is the sum of the costs of all substrings used. Each substring can be used multiple times, and its cost is incurred each time it's used.


2) Validity: A substring from the list can only be used if it is a substring of the main string.


3) Overlap: When concatenating, substrings can overlap. For example, to form "adkmu", using "adkm" (cost 1) and "kmu" (cost 2) is a valid strategy. The concatenation "adkmkmu" can be reduced to "adkmu" by removing the overlapping part. The total cost is simply the sum of the costs of the chosen substrings (1 + 2 = 3).


Your task is to help Sara find the minimum cost to construct the entire main string. If it's impossible to form the main string with the given substrings, you should report it.


Problem approach

This problem is a variation of the "Word Break" problem, where we need to construct a string using given substrings at the minimum cost. We can solve this using Dynamic Programming (DP) + Breadth-First Search (BFS).

Step 1: Preprocessing Substrings
a) Store only those substrings that exist in the main string.
b) Discard any substring not present in the main string, as they cannot contribute to the solution.

Step 2: Graph-based Approach (BFS + DP)
a) Define a DP Array → dp[i] represents the minimum cost to form the prefix main_string[0:i].
b) Initialize dp[0] = 0 (cost of forming an empty string is 0).
c) Iterate over all positions in the main string and try to extend it using available substrings.
d) Use a BFS-like approach, treating each position as a node and substrings as edges.
e) For each valid substring, update the minimum cost required to reach that position.

Step 3: Check for Valid Completion
a) If dp[length_of_main_string] is infinity, print "Impossible" (meaning no valid formation exists).
b) Otherwise, print the minimum cost stored in dp[length_of_main_string].

Try solving now

2. Tennis Match Scheduling

Moderate
0/80

You are an organizer for a company's tennis club. Given a list of dates where participants are unavailable, and a required number of matches M, your task is to schedule the matches on the available days.


The calendar for scheduling is determined by the input: it runs from day 1 up to the latest occupied date provided. For example, if the latest occupied date is 10, the calendar consists of days 1, 2, ..., 10.


You should schedule the M matches on the earliest available dates.


The output should be a sequence of all dates in the calendar range.


  • Unavailable dates should be represented by their number.

  • Available dates chosen for a match should be marked with an "X".

  • Available dates that are not used for a match (because M matches have already been scheduled) should be represented by their number.

If there are not enough available dates to schedule all M matches, it is impossible.


Problem approach

1. Read the input data:- Extract the list of occupied dates and the required match days.
2. Identify free slots:- Find gaps between the given occupied dates and after the last occupied date.
3. Insert "X" markers:
a) If a gap between two occupied dates is large enough to accommodate required match days, place "X" there.
b) If not enough free slots are found, print "Impossible".
4. Output the updated sequence, marking available match days with "X".

Try solving now

3. Dominant Grade

Easy
0/40

An automated classroom assessment system determines a class's overall performance based on a string of individual student grades. The grades are 'A', 'B', 'C', 'D', 'E', 'F', with a strict precedence order: A > B > C > D > E > F.


The final grade is determined by comparing the total count of high-ranking grades against the total count of low-ranking grades.

1) High Group: Consists of grades 'A', 'B', and 'C'.

2) Low Group: Consists of grades 'D', 'E', and 'F'.


First, calculate the total score for each group:

high_score = count('A') + count('B') + count('C')

low_score = count('D') + count('E') + count('F')


The final dominant grade is determined by the following rules:

If high_score > low_score, the winner is the highest-ranking grade that is present in the High Group (check for 'A' first, then 'B', then 'C').

If low_score > high_score, the winner is the highest-ranking grade that is present in the Low Group (check for 'D' first, then 'E', then 'F').

If high_score == low_score (a tie), the winner is the highest-ranking grade present in the entire class.


Your task is to implement a function that takes the string of grades and returns the single character representing the final dominant grade.


Problem approach

Step 1: Count frequencies of each grade

Create a dictionary or map to store grade counts.

Iterate through the input string once.

Step 2: Find the maximum frequency

Iterate through the frequency counts.

Keep track of the highest count.

Step 3: Find grades with the maximum frequency

Collect all grades that appear the maximum number of times.

Step 4: Apply precedence rules

Among the grades with the same highest frequency,

Return the highest grade according to the precedence rule.

Try solving now
02
Round
Medium
Face to Face
Duration90 minutes
Interview date31 Jan 2025
Coding problem4

The Code Pairing Round was conducted during the daytime as part of the overall selection process. The environment was interactive and collaborative, with two ThoughtWorkers assigned to a group of five students.

Each student was given the same problem to solve individually using OOP concepts such as classes and methods. After writing the initial solution, the interviewers reviewed the code, provided feedback, and asked for optimizations based on real-world variables, meaningful comments, and additional feature requirements.

The interviewers were highly engaging and supportive, encouraging logical thinking and a structured approach to problem-solving.

1. Menu Billing

You are given a menu table containing details of food items, including:

  • Item Code (e.g., A001, A002, A003, A004)
  • Item Name (e.g., Pizza, Burger, Pasta, Sandwich)
  • Item Price (e.g., 150, 120, 200, 100)

Your task is to build a program that allows a person to order food items from the menu. The program should calculate the total cart value and apply a surcharge fee of ₹50 if the total is less than ₹300. Finally, return the final amount payable.

Problem approach

Step 1: I first stored the menu items using a dictionary/list of objects, where each item had an Item Code, Name, and Price.

Step 2: The interviewer asked me to allow users to input multiple items by entering their item names and quantities.

Step 3: Then, I fetched the price of each selected item from the menu and multiplied it by the quantity to calculate the cart total.

Step 4: The interviewer asked me to implement a surge fee. So, I applied a ₹50 charge if the total price was below ₹300.

Step 5: Finally, I displayed the order summary, showing the selected items, total price, and final amount payable.

2. Restaurant Restriction

This was an add-on to the previous problem:
Add-on 1: Multi-Restaurant Ordering Restriction

Now, there are two restaurants:

  • Restaurant A
  • Restaurant B

Each menu item belongs to only one restaurant, and the user must select a restaurant before ordering.
If an order contains items from both restaurants (e.g., A001 and B003), the system should return an error.

Problem approach

Step 1: I first defined menus separately for Restaurant A and Restaurant B, storing item details individually.

Step 2: The interviewer asked me to ensure that users select a restaurant before placing an order. So, I added a prompt for Restaurant A or B.

Step 3: Then, I implemented user input handling:
a) Users could only enter item codes from the selected restaurant.
b) If an order contained mixed restaurant items (e.g., A001 and B002), the program would return an error message.

Step 4: Finally, I calculated the cart total and applied a ₹50 surge fee if the total price was below ₹300, ensuring correct pricing.

3. Availability Check

Addon 2: Ordering Based on Item Availability Across Restaurants

Now, instead of item codes, customers can place orders using food names.
If an item is unavailable at one restaurant, the system should automatically check the other restaurant and add it to the cart.

Problem approach

Step 1: I first defined menus separately for Restaurant A and Restaurant B, storing item details individually.

Step 2: The interviewer asked me to modify the input method, so I implemented a food name-based ordering system instead of using item codes.

Step 3: Then, I handled availability and restaurant assignment:

If an item was available in only one restaurant, it was automatically assigned.
If an item was available in both restaurants, the user was asked to choose the preferred restaurant.
Step 4: Finally, I calculated the cart total and applied a ₹50 surge fee if the total price was below ₹300, ensuring correct pricing.

4. Night Fee

Addon 3: Time-Based Surge Fee
Now, instead of a price-based surge fee, a ₹50 fee applies if the order is placed between 10 PM and 6 AM.

Problem approach

Step 1: I first stored the menu data in the same format as in the main problem, keeping item details unchanged.

Step 2: The interviewer asked me to implement a time-based surge fee, so I fetched the current system time when the order was placed.

Step 3: Then, I added a time check condition:
a) If the order was placed between 10 PM (22:00) and 6 AM (06:00), a ₹50 surge fee was applied.
b) Otherwise, no surge fee was added.

Step 4: Finally, I calculated the final price and displayed the order summary based on whether the surge fee was applicable or not.

03
Round
Medium
Face to Face
Duration60 minutes
Interview date31 Jan 2025
Coding problem7

The interview took place during the day (exact time not specified). The setting was professional and engaging, with a focus on technical depth and problem-solving skills. The interview covered multiple domains, ensuring a thorough evaluation of both theoretical and practical knowledge.

There were two interviewers, one from the backend team. They asked questions related to:
a) Resume-based discussions
b) Data Structures and Algorithms (DSA)
c) Computer Networks
d) SQL queries
e) System Design (real-world scenarios)
f) Project-specific deep dives

1. Odd Ball

You are given 10 identical-looking balls, out of which 9 have the same weight and 1 ball has a different weight (it could be either heavier or lighter). You are also provided with a balancing scale that can compare two groups of balls at a time.

Your task is to identify the ball with the different weight in the minimum number of weighings.

Problem approach

Tip 1: Use a Divide-and-Conquer Strategy
Instead of checking the balls one by one, split them into three groups and use the balance scale strategically.

Tip 2: Stepwise Approach to Solve

First Weighing: Divide the 10 balls into three groups:
a) 3 balls on the left side of the scale
b) 3 balls on the right side of the scale
c) 4 balls left aside (not weighed yet)
d) If the balance is equal → the odd ball is among the 4 left-out balls.
e) If the balance tips → the odd ball is among the 6 balls on the scale.

Second Weighing:
a) If the odd ball is among the 4 left-out balls, take 3 of them and weigh them against 3 normal balls.
b) If the odd ball is among the 6 balls on the scale, select 3 from the heavier/lighter side and weigh them against 3 other balls from the opposite side.

Third Weighing:
By now, you’ll have narrowed it down to one specific ball and can determine whether it is heavier or lighter based on the previous results.

Tip 3: Minimum Weighings Required
This puzzle can be solved in a maximum of three weighings using a logical approach instead of brute force.

2. 0 1 Knapsack

Easy
15m average time
85% success
0/40
Asked in companies
TwitterWalmartAmazon

A thief is robbing a store and can carry a maximal weight of W into his knapsack. There are N items and the ith item weighs wi and is of value vi. Considering the constraints of the maximum weight that a knapsack can carry, you have to find and return the maximum value that a thief can generate by stealing items.

Problem approach

Brute Force Approach (Recursive Solution):
1. Initially, I started solving this problem using a recursive approach, where for each item, I had two choices:
a) Include the item (if it fits in the knapsack).
b) Exclude the item and move to the next.
2. This method works but has exponential time complexity O(2^N), making it inefficient for large inputs.

Try solving now

3. Database Design

They gave me a bill for the food they had eaten in the cafeteria, and I needed to design the necessary database tables and schema that a restaurant would require for maintaining its billing and order management system—not everything in detail, but the core (raw) tables.

Problem approach

Tip 1: Analyze the entire bill carefully and identify all the details.
Tip 2: Try to divide the schema into segments, such as Customer and Restaurant.

4. Project Description

In this section, I have to describe my projects or a specific project in detail.

Problem approach

Tip 1: Try explaining a project that is creative and solves a real-world problem.
Tip 2: Explain the entire pipeline clearly.
Tip 3: Describe the challenges you faced and how you tackled them.
Tip 4: Make the conversation engaging and explain your project thoroughly.

5. SQL Questions

  • Define the ACID properties. (Learn)
  • Explain joins. (Learn)
  • Write a query implementing joins.
  • What is the LIKE keyword in SQL? (Learn)
  • Explain the HAVING clause.
Problem approach

Tip 1: Explain everything in detail.
Tip 2: They will provide you with a sheet, so try to explain it by writing examples for everything.

6. Networking Basics

Problem approach

Tip 1: Explain everything in detail.
Tip 2: They will provide you with a sheet, so try to explain each item by writing examples.

7. Work Experience

Tell me about your experience in the previous company and what you did there.

Problem approach

Tip 1: You can explain briefly or in detail, depending on the time you have left.
Tip 2: Talk about the tech stack you used during your internship.

04
Round
Easy
HR Round
Duration60 minutes
Interview date31 Jan 2025
Coding problem1

Timing: The HR round was conducted around 5 PM on the same day.

Environment: The atmosphere was professional yet relaxed, allowing for an open and meaningful discussion.

Significant Activity: The discussion primarily revolved around gender equality, inclusivity, and workplace diversity, focusing on how I would collaborate with non-binary individuals and ensure a positive team culture.

Interviewer: The interviewer was friendly, encouraging, and genuinely interested in understanding my perspectives rather than evaluating technical skills. It was not an elimination round but rather a means to assess cultural fit.

1. HR Questions

The HR round focused on gender equality, workplace inclusivity, and diversity. The interviewer asked questions such as:

  • How would I work with non-binary individuals in a team?
  • What are my opinions on gender equality in the workplace?
  • How would I ensure inclusivity while working with a diverse team?
  • Can I describe situations where I had to handle team conflicts or diversity-related challenges?
Problem approach

Tip 1: Be honest and open-minded.
Tip 2: Provide real-life examples.
Tip 3: Respect different perspectives — acknowledge that every individual brings unique strengths to a team.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8518 views
0 comments
0 upvotes
Analytics Consultant
3 rounds | 10 problems
Interviewed by ZS
907 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3320 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
2581 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes