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

Software Engineer

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

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Stay focused
Tip 2 : Practice coding questions.
Tip 3 : View previous interviews of the companies

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

Tip 1 : Don't lie on resume
Tip 2 : Just write in format that is catchy

Interview rounds

01
Round
Easy
Online Coding Test
Duration180 Minutes
Interview date4 Sep 2020
Coding problem5

it was an coding round. i was not able to solve questions

1. Anagram Pairs

Moderate
30m average time
60% success
0/80
Asked in companies
NearbuyAppleAmerican Express

You are given two strings 'str1' and 'str1'.


You have to tell whether these strings form an anagram pair or not.


The strings form an anagram pair if the letters of one string can be rearranged to form another string.

Pre-requisites:

Anagrams are defined as words or names that can be formed by rearranging the letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "rasp" are anagrams. 

Other examples include:

'triangle' and 'integral'
'listen' and 'silent'
Note:
Since it is a binary problem, there is no partial marking. Marks will only be awarded if you get all the test cases correct. 
Try solving now

2. Remove character

Easy
0/40
Asked in companies
Expedia GroupThought WorksHewlett Packard Enterprise

For a given string(str) and a character X, write a function to remove all the occurrences of X from the given string and return it.

The input string will remain unchanged if the given character(X) doesn't exist in the input string.

Try solving now

3. Complete String

Hard
40m average time
60% success
0/120
Asked in companies
SprinklrThought WorksBNY Mellon

Ninja developed a love for arrays and strings so this time his teacher gave him an array of strings, ‘A’ of size ‘N’. Each element of this array is a string. The teacher taught Ninja about prefixes in the past, so he wants to test his knowledge.

A string is called a complete string if every prefix of this string is also present in the array ‘A’. Ninja is challenged to find the longest complete string in the array ‘A’.If there are multiple strings with the same length, return the lexicographically smallest one and if no string exists, return "None".

Note :
String ‘P’ is lexicographically smaller than string ‘Q’, if : 

1. There exists some index ‘i’ such that for all ‘j’ < ‘i’ , ‘P[j] = Q[j]’ and ‘P[i] < Q[i]’. E.g. “ninja” < “noder”.

2. If ‘P’ is a prefix of string ‘Q’, e.g. “code” < “coder”.
Example :
N = 4
A = [ “ab” , “abc” , “a” , “bp” ] 

Explanation : 

Only prefix of the string “a” is “a” which is present in array ‘A’. So, it is one of the possible strings.

Prefixes of the string “ab” are “a” and “ab” both of which are present in array ‘A’. So, it is one of the possible strings.

Prefixes of the string “bp” are “b” and “bp”. “b” is not present in array ‘A’. So, it cannot be a valid string.

Prefixes of the string “abc” are “a”,“ab” and “abc” all of which are present in array ‘A’. So, it is one of the possible strings.

We need to find the maximum length string, so “abc” is the required string.
Try solving now

4. Segregate Odd-Even

Moderate
25m average time
75% success
0/80
Asked in companies
Wells FargoThought WorksMicrosoft

There is a wedding ceremony at NinjaLand. The bride and groom want everybody to play a game and thus, they have blindfolded the attendees. The people from the bride’s side are holding odd numbers and people from the groom’s side are holding the even numbers. For the game to start quickly, all the bride’s side people should come first, followed by the groom’s side people in the same order.

The attendees of the wedding with their numbers are given in the form of a Singly Linked List, arranged randomly.

A singly linked list is a type of linked list that is unidirectional; that is, it can be traversed in only one direction from head to the last node (tail).

Example:
The attendees holding numbers from 1, 4, 3 are shown: 

As the organizers are busy, you have to arrange all the people by arranging the bride’s side people first followed by the groom’s side people sequentially.

Note:
For the above example 1 -> 4 -> 3, 1 -> 3 -> 4 is the only correct answer, i.e nodes should be grouped sequentially. Hence, 3 -> 1 -> 4 is the wrong answer as we have to preserve the same order.
Try solving now

5. Boundary Sum

Moderate
40m average time
62% success
0/80
Asked in companies
AmazonThought WorksDXC Technology

Given a Binary Tree of 'N' nodes, find and print the sum of all the boundary nodes. Boundary nodes consist of a root node, leftmost external nodes, rightmost external nodes and all the leaves of the tree.

Example :
Given binary tree :

input

Boundary Nodes :
         Root : 2
         Leftmost : 35
         Rightmost : 10
         Leaf nodes : 2,3,5,2
         Sum : 59
Try solving now

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
2 rounds | 4 problems
Interviewed by Thought Works
0 views
0 comments
0 upvotes
company logo
Software Developer
5 rounds | 8 problems
Interviewed by Thought Works
0 views
0 comments
0 upvotes
company logo
Application Developer
3 rounds | 5 problems
Interviewed by Thought Works
1300 views
0 comments
0 upvotes
company logo
Grad Consultant
4 rounds | 5 problems
Interviewed by Thought Works
338 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
4 rounds | 1 problems
Interviewed by Newgen Software
3210 views
2 comments
0 upvotes
company logo
Software Engineer
3 rounds | 6 problems
Interviewed by HashedIn
2582 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Ernst & Young (EY)
0 views
0 comments
0 upvotes