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

SDE - 1

Thought Works
upvote
share-icon
2 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: data structure, Coding question practice, OOPS, algorithms, CS Fundamentals
Tip
Tip

Tip 1 : Study CS Fundamentals 
Tip 2 : Practice coding questions as many as you can
Tip 3 : Do make projects and mention them in your resume

Application process
Where: Campus
Eligibility: 7
Resume Tip
Resume tip

Tip 1 : It should only be one page long
Tip 2 : Mention your projects in it

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date15 Sep 2021
Coding problem4

there were MCQ + coding question in this 13 CS Fundamentals Mcqs + 3 coding Questions

1. 3Sum

Moderate
15m average time
85% success
0/80
Asked in companies
Goldman SachsAdobeAmazon

You are given an array/list ARR consisting of N integers. Your task is to find all the distinct triplets present in the array which adds up to a given number K.

An array is said to have a triplet {ARR[i], ARR[j], ARR[k]} with sum = 'K' if there exists three indices i, j and k such that i!=j, j!=k and i!=j and ARR[i] + ARR[j] + ARR[k] = 'K'.

Note:
1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Try solving now

2. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80
Asked in companies
QualcommUberAmazon

You are given an array 'arr' of length 'n', consisting of integers.


A subarray is a contiguous segment of an array. In other words, a subarray can be formed by removing 0 or more integers from the beginning and 0 or more integers from the end of an array.


Find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.


The sum of an empty subarray is 0.


Example :
Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]

Output: 11

Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
Problem approach

Initialize the variables maxx = a[0] and currentmax = a[0] Run a for loop from 1 to N-1 and for each index I Add the arr[i] to currentmax. If maxx is less than currentmax then update maxx to currentmax.
If currentmax < a[i]+currentmax then update currentmax = a[i]
Return max_so_far

Try solving now

3. MCQ Question

Which data structure allows deleting data elements from front and inserting at the rear?

Stacks

Queues

Dequeues

Binary search tree

Problem approach

queue

4. Predict Output

#include
void fun(int **p);

int main()
{
   int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 8, 7, 8, 9, 0};
   int *ptr;
   ptr = &a[0][0];
   fun(&ptr);
   return 0;
}
void fun(int **p)
{
   printf("%d\n", **p);
}

A. 1
B. 2
C. 3
D. 4

Problem approach

A) 1

02
Round
Medium
Video Call
Duration105 minutes
Interview date17 Sep 2021
Coding problem1

I was given a problem statement that has to be solved using OOPs concepts. This round went around 1hr 45mins.

1. System Design Question

Design an online book reader system (Object-Oriented Design).

Problem approach

To design a basic online reading system that provides the following functionality:

• Searching the database of books and reading a book.
• User membership creation and extension.
• Only one active user at a time and only one active book by this user
The class OnlineReaderSystem represents the body of our program. We could implement
the class such that it stores information about all the books dealing with user management and refreshes the display, but that would make this class rather hefty. Instead, we’ve chosen to tear off these components into Library, UserManager, and Display classes.
The classes:
1. User
2. Book
3. Library
4. UserManager
5. Display
6. OnlineReaderSystem

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Thought Works
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Thought Works
1221 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Thought Works
551 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Thought Works
660 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6365 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2197 views
0 comments
0 upvotes