Thoughtspot MTS 3 Interview Experience (Full stack) | YOE - 2.5 years
MTS 3Thoughtspot MTS4 Interview - Reject
MTS4ThoughtSpot | SDE-2 Backend | Bangalore
SDE-2 BackendThoughtSpot | Senior Software Engineer | LLD Design problem
Senior Software EngineerThoughtspot - SMTS - Frontend
SMTS - Frontend1 more experiences below
Summary
Applied for MTS 3 role at Thoughtspot with 2.5 years of experience. The interview process included three rounds with a mix of technical and behavioral questions. The first round focused on data structures, the second on algorithms and system design, and the third on resume deep dive and behavioral questions.
Full Experience
Round 1: I was asked to implement a versioned stack, which I solved using the provided link. Another question was about adding two large numbers using linked lists, which was similar to the LeetCode problem Add Two Numbers.
Round 2: The interviewer asked about alternatives to Redux for state management since my resume mentioned it. I discussed using Context API and MobX as alternatives. Then, I was asked about how GraphQL works, and I explained the query execution process. Lastly, there was a question about how streaming works in LLM chatbots, which I explained involves breaking down the response into chunks and sending them incrementally.
Round 3: This was a resume deep dive round. The interviewer discussed my projects and asked about alternate approaches to solve the same problems. There were also some behavioral questions.
Interview Questions (2)
Given two large numbers that do not fit into normal integers, add them using a linked list. The solution should be similar to the LeetCode problem Add Two Numbers.
Summary
I applied for an MTS4 position at Thoughtspot and went through five rounds covering Data Structures & Algorithms, High-Level Design, Low-Level Design + System Design, and Managerial topics, but was rejected in the Managerial round.
Full Experience
I recently applied for SMT4 at Thoughtspot:
R1: DS algo
Q1. Variation of Knapsack problem.
Q2. Given a number find its equivalent excel sheet column name. Like 26 is Z, 27 is AA.
R2. DS algo
Q1. Variation of coin change problem. Given an array of numbers where each number is binary but its value is in decimal i.e [0,1,10,11 ...] have valus of 0,1,ten,eleven and so on and given a num N find min no of elements from the given array to form N.
Q2. Optimizations of above question
R3. HLD
Design a event and engagement tracker system
Vendors will onboard their product to your system.
Users will be sent different campaigns by mail or sms and if a user clicks on a campaign link it should redirect to the actual product vendor onboarded.
Show different metrices like click, impression etc to vendors
R4. LLD+System design
Design chatGpt based UI. Assume we have a LLM model that is working fine but can not retain context of the conversation.
User can have multiple chats.
User can continue some old chat and you need to make sure input to ML model should be provided such that it gives accurate response to the prompt provided by user. Do keep in mind that model can not retain context so it should be taken care by you. DB choice. Class diagram. Apis. Flow. etcetc
R5: Managerial
Explain a recent task you did.
Why do you want to leave your current org
How do you keep up with GenAi stuff
etc etc
Rejected in Managrial round.
Interview Questions (7)
Given an integer, return its corresponding column title as it appears in an Excel sheet. For example, 1 -> A, 2 -> B, ..., 26 -> Z, 27 -> AA, 28 -> AB, etc.
Given an array of numbers where each number is represented in binary but its value is interpreted in decimal (e.g., [0, 1, 10, 11, ...] have decimal values 0, 1, 2, 3, ...), and a target number N, find the minimum number of elements from the given array to form N.
Design an event and engagement tracker system. Vendors onboard their products. Users receive campaign links via mail/SMS; clicking redirects to the product. The system should track and display metrics like clicks, impressions, etc., to vendors.
Design a ChatGPT-based UI, assuming an LLM model that works but cannot retain conversation context. Users can have multiple chats and continue old ones. The design must ensure that input to the ML model is provided such that it gives accurate responses, managing the context since the model itself cannot retain it. Include details on DB choice, class diagram, APIs, flow, etc.
Explain a recent task you completed.
Why do you want to leave your current organization?
How do you keep up with Generative AI (GenAI) technologies and developments?
Summary
This post outlines a backend SDE-2 interview experience at ThoughtSpot on April 11, 2024, detailing four technical questions covering string manipulation, graph algorithms, and system design, along with approaches and code for some problems.
Full Experience
ThoughtSpot | SDE - 2 (Backend)
Interview Date: 11 April 2024
Ques 1: Given a sorted string S of length N consisting of only lowercase english alphabets. The task is to return the length of longest substring consisting of same characters.
Input: aaabbccccdde Ans: 4 (substring is "cccc")
First Approach: Linear traversal, TC: O(N) Iterate through the string and maintain a counter of same characters. Update global answer whenever encounter a different character. Repeat till end of string is reached.
Second Approach: Binary Search, TC: 26*log(N) For every 26 characters in ['a' to 'z'], we do a binary search. Find the first and last position of the character in string 'S'. Update global answer with maximum of all answers i:e [last - first + 1].
Ques2: Course Schedule II
Ques3: LRU Cache
Approach: We will binary search on the answer. Suppose our current stress level to test is K.
Then we will run a BFS from source and only consider the edge with weight <= K. If there exist a path from source to destination for current K, we consider this as answer and check for lower value of K, otherwise, we check for higher value of K.
K can have value in range [min(edge weight) to max(edge weight)]
TC: E*log(max(edgeWeight))
import java.util.*;
public class code {
private static boolean checkBFS(int n, List<Integer[]> adj[], int k, int src, int dst) {
Queue<Integer> q = new LinkedList<>();
int[] vis = new int[n+1];
Arrays.fill(vis, -1);
q.add(src);
vis[src]=1;
while (!q.isEmpty()) {
int curr = q.poll();
if (curr == dst) {
return true;
}
for (Integer [] edge : adj[curr]) {
if (edge[1] > k || vis[edge[0]]!=-1) continue;
q.add(edge[0]);
vis[edge[0]]=1;
}
}
return false;
}
private static int findMinStressPath(int n, int m, int[][] edges, int src, int dst) {
int low = Integer.MAX_VALUE;
int high = -1;
List<Integer[]> adj[] = new ArrayList[n+1];
Arrays.setAll(adj, a -> new ArrayList<>());
for (int i=0; i<m; ++i) {
int u = edges[i][0];
int v = edges[i][1];
int w = edges[i][2];
low = Math.min(low, w);
high = Math.max(high, w);
adj[u].add(new Integer[]{v, w});
adj[v].add(new Integer[]{u, w});
}
int ans = high;
while (low <= high) {
int mid = low + (high-low)/2;
if (checkBFS(n, adj, mid, src, dst)) {
ans = mid;
high = mid-1;
} else {
low = mid+1;
}m
}
return ans;
}
public static void main(String[] args) {
int n = 5;
int m = 6;
int[][] edges = new int[][]{{1,2,10}, {2,3,5}, {1,4,15}, {4,3,2}, {1,5,4}, {5,3,6}};
int source = 1;
int destination = 3;
System.out.println(findMinStressPath(n,m,edges, source, destination));
}
}
Interview Questions (4)
Given a sorted string S of length N consisting of only lowercase english alphabets. The task is to return the length of longest substring consisting of same characters.
Input: aaabbccccdde Ans: 4 (substring is "cccc")
Course Schedule II
LRU Cache
Given an undirected graph with N vertices and M edges. Each edge (u,v) has a weight w. Given a source S and destination D. We have to find a path from S to D such that the maximum edge weight in the path is minimized. This maximum edge weight in the path is called the stress level. We have to find the minimum possible stress level.
Summary
I encountered a Low-Level Design (LLD) problem during my interview at ThoughtSpot for a Senior Software Engineer role, where I had to design a meeting scheduler system.
Full Experience
ThoughtSpot LLD Design problem
You are required to design a meeting scheduler system with the following capabilities:
- There are N predefined meeting rooms available in the system.
- A user should be able to book a meeting available room by providing:
- Array of rooms[] with details {startTime, endTime, requiredCapacity}
- The system should send notifications to all participants invited to the meeting
- The system should maintain a Meeting Room Calendar to:
- Track scheduled meetings for each room
- Display meetings for the current day.
Interview Questions (1)
You are required to design a meeting scheduler system with the following capabilities:
- There are N predefined meeting rooms available in the system.
- A user should be able to book a meeting available room by providing:
- Array of rooms[] with details {startTime, endTime, requiredCapacity}
- The system should send notifications to all participants invited to the meeting
- The system should maintain a Meeting Room Calendar to:
- Track scheduled meetings for each room
- Display meetings for the current day.
Summary
I interviewed for an SMTS Frontend role at Thoughtspot. I successfully solved a coding question involving the design of a Store class, but despite my solution passing all test cases, I was ultimately rejected, which I found puzzling given the interviewer's apparent disinterest.
Full Experience
I recently interviewed at Thoughtspot SMTS position.
I felt things went really smooth.
i was also able to solve a question that was given in really less time.
but i got rejected.
here is a question i was asked.
const userStore = new Store();
userStore.save("user_id_1", "samuel jackson");
const unsubscribe1 = userStore.subscribe(
"user_id_1",
(value) => {
console.log("first", value);
}, // update function
() => {
console.log("cleanup1");
} // cleanup function
);
userStore.save("user_id_1", "samuel l jackson"); //all the updaters should get called corresponding to “user_id_1”
unsubscribe1(); //should remove the update function
I was asked to design a Store class from scratch. The class needed to support three main operations:
Subscribe – This method takes a key, an update function and a cleanup function. Also, the subscribe method should return a cleanup function that can remove that specific update function when it’s no longer needed.
Save – This takes a key and a value. When a value is saved, it should notify all the update functions subscribed to that key.
Remove – This should simply remove the key from the internal cache.
But i got rejected. Something doesnt feel right.
Is my solution wrong?
I agree there could be some optimisations.
but he could have asked me to optimise, but he dint utter a word.
he also seemed very disinterested in the interview from the beginning.
Really a very bad experience.
Interview Questions (1)
I was asked to design a Store class from scratch. The class needed to support three main operations:
Subscribe – This method takes a key, an update function and a cleanup function. Also, the subscribe method should return a cleanup function that can remove that specific update function when it’s no longer needed.
Save – This takes a key and a value. When a value is saved, it should notify all the update functions subscribed to that key.
Remove – This should simply remove the key from the internal cache.
Example usage:
const userStore = new Store();
userStore.save("user_id_1", "samuel jackson");
const unsubscribe1 = userStore.subscribe(
"user_id_1",
(value) => {
console.log("first", value);
}, // update function
() => {
console.log("cleanup1");
} // cleanup function
);
userStore.save("user_id_1", "samuel l jackson"); //all the updaters should get called corresponding to “user_id_1”
unsubscribe1(); //should remove the update function
Summary
I recently interviewed for an SDE-2 role at ThoughtSpot, which involved coding rounds focusing on array/hashmap problems and graph traversal, followed by a Low-Level Design round.
Full Experience
Coding Round 1
The first coding question involved an array and an integer k. I needed to find the count of distinct elements for each subarray of size k. I solved this problem effectively using a two-pointer approach combined with a hashmap.
Coding Round 2
The second coding problem was a classic Snake and Ladder board game scenario. I was given an M x N board, along with the start and end points for snakes and ladders. The goal was to find the minimum number of dice throws required to reach the last cell from the first. For example, with M=5, N=6 (total 30 cells), snakes at 7->4, 16->2, 29->11, and ladders at 3->19, 22->28, the answer was 3. I approached this by modeling the board as a graph. The edges in my graph included all snakes, all ladders, and for each cell, an edge to the next six cells (representing dice throws 1 to 6). My task was to find the minimum shortest path from node 1 to node M*N.
Low-Level Design (LLD) Round
The LLD round focused on designing a Logger system.
Interview Questions (3)
You are given an array arr and an integer k. You need to find the count of distinct elements for each subarray of size k.
You are given a snake and ladder board of size M x N. You are also given start and end points of the snakes and ladders. Find the minimum number of dice throws required to reach the last cell from the first.
Example:
M=5, N=6(total 30 cells)- Snakes:
7->4, 16->2, 29->11 - Ladders:
3->19, 22->28
Expected Answer: 3
Design a Logger system.