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

Application Developer

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

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, Pointers, OOPS, Algorithms, Dynamic Programming, My SQL, Database, Operating System
Tip
Tip

Tip 1 : Practice Atleast 250 Questions on GFG/Leetcode
Tip 2 : For DSA questions in interviews, start explaining from the brute force approach and then move to the optimal one. Convey your thought process to the interviewers, so that they can help you out if you get stuck.
Tip 3 : Do not write anything that you are not confident of in resume
Tip 4 : Do atleast 2 projects

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

Tip 1 : Try to include at least one development project in your resume.
Tip 2 : Interviewer will ask anything from your resume so be prepared for it.
Tip 3 : Don't mention some random projects which you are not sure about or copied from Google or somewhere else.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date1 Nov 2021
Coding problem3

MCQs were based upon DS Algo, Code output, OOPS, DS Fundamentals

1. Output Question

What will be the output of the following code snippet?

#include void solve() {    int a[] = {1, 2, 3, 4, 5};    int sum = 0;    for(int i = 0; i < 5; i++) {        if(i % 2 == 0) {            sum += *(a + i);        }        else {            sum -= *(a + i);        }    }    printf("%d", sum);}int main() { solve(); return 0;}

Problem approach

Ans : 3

2. Maximum Subarray Sum

Moderate
0/80
Asked in companies
IntuitAmazonOracle

You are given an array/list ARR consisting of N integers. Your task is to find the maximum possible sum of a non-empty subarray(contiguous) of this array.

Note: An array C is a subarray of array D if it can be obtained by deletion of several elements(possibly zero) from the beginning and the end of array D.

For e.g.- All the non-empty subarrays of array [1,2,3] are [1], [2], [3], [1,2], [2,3], [1,2,3].

Problem approach

Initialize:
max_so_far = INT_MIN
max_ending_here = 0

Loop for each element of the array
(a) max_ending_here = max_ending_here + a[i]
(b) if(max_so_far < max_ending_here)
max_so_far = max_ending_here
(c) if(max_ending_here < 0)
max_ending_here = 0
return max_so_far

Try solving now

3. Longest Decreasing Subsequence

Moderate
35m average time
60% success
0/80
Asked in companies
CultfitAmazonThought Works

You are given an array/list ARR consisting of N integers. Your task is to find the length of the longest decreasing subsequence.

A subsequence is a sequence of numbers obtained by deleting zero or more elements from the array/list, keeping the relative positions of elements same as it was in the initial sequence. A decreasing subsequence is a subsequence in which every element is strictly less than the previous number.

Note:

There can be more than one subsequences with the longest length.
For example:-
For the given array [5, 0, 3, 2, 9], the longest decreasing subsequence is of length 3, i.e. [5, 3, 2]
Note:
Try to solve the problem in O(N log N) time complexity.
Problem approach

char arr[] = str.toCharArray();
int n = arr.length;
int dp[] = new int[n];
dp[0] = 1;
int res = 1;
for(int i = 1; i < n; i++){
if(arr[i] <= arr[i-1]){
dp[i] = dp[i-1] + 1;
}else{
dp[i] = 1;
}
res = Math.max(dp[i], res);
}
return res;

Try solving now
02
Round
Hard
Video Call
Duration90 Minutes
Interview date2 Nov 2021
Coding problem2

This was the code pair round. In this round Interviewer gives you DSA problem and you have write the optimal code for the given problem.

1. Meeting

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

Ninja is organizing a meeting in an office that starts at a time ‘0’ and will end at a time ‘LAST’. There are ‘N’ presentations that are going to take place in that meeting whose start and end times are given, i.e., ‘ith’ presentation starts at ‘START[i]’ and ends at ‘END[i]’. The presentations don’t overlap with each other. Ninja wants to reschedule at most ‘K’ presentations keeping the original order intact so that the longest period in which there is no presentation scheduled during the meeting is maximized.

Since Ninja is busy with other office work, your task is to help Ninja to reschedule at most ‘K’ presentations.

Note:
The presentation’s duration can’t be changed. You can only change the start and end times.
Try solving now

2. System Design Question

Design a system for Toll Booth.

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
Application Developer
4 rounds | 7 problems
Interviewed by Thought Works
1243 views
1 comments
0 upvotes
company logo
Application Developer
5 rounds | 7 problems
Interviewed by Thought Works
1036 views
0 comments
0 upvotes
company logo
Application Developer
3 rounds | 5 problems
Interviewed by Thought Works
962 views
0 comments
0 upvotes
company logo
Application Developer
3 rounds | 5 problems
Interviewed by Thought Works
1331 views
0 comments
0 upvotes