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

SDE - 1

ThoughtSpot
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I started my coding journey from youtube, where I first learned the data structure and Algorithm. Then, I started my preparation of Data Structure on the LinkedIn.
Application story
I applied through referral.
Why selected/rejected for the role?
I was rejected because I could not give precise and optimized solutions to the questions asked.
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming,System Design, Link List and Graphs
Tip
Tip

Tip 1 - Practice at least 250 Questions.
Tip 2 - Do at least 2 projects.

Application process
Where: Referral
Eligibility: Above 6 CGPA
Resume Tip
Resume tip

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Easy
Video Call
Duration60 mins
Interview date22 Feb 2023
Coding problem2

1. Sort Array

Moderate
15m average time
85% success
0/80
Asked in companies
SprinklrHSBCHCL Technologies

You are given an array consisting of 'N' positive integers where each integer is either 0 or 1 or 2. Your task is to sort the given array in non-decreasing order.

Note :
1. The array consists of only 3 distinct integers 0, 1, 2.
2. The array is non-empty.
Problem approach

Wrote pseudocode for it and explained the algorithm in simple terms. Mentioned that merge sort and quick sort are better. However, merge sort will use more memory and I explained how the worst case of quick sort can be avoided by using a random pivot.

Try solving now

2. Puzzle

You have a set of 10 weights, each weighing 10g. There are 10 such sets. However, one set contains 10 weights of 9g. Determine the set with the 9g weights by using a weighing scale only once.

Solution: Take 1 weight from set 1, 2 weights from set 2, and so on up to 10 weights from set 10. Place all of them on the weighing scale at once. Subtract the weight on the scale from 100g to determine which set contains the 9g weights.

Problem approach

Tip 1 : Practice such questions from online platforms.

02
Round
Easy
Video Call
Duration60 mins
Interview date22 Feb 2023
Coding problem2

1. N-th Fibonacci Number

Moderate
40m average time
70% success
0/80
Asked in companies
MathworksAmazonOracle

You are given an integer ‘N’, your task is to find and return the N’th Fibonacci number using matrix exponentiation.

Since the answer can be very large, return the answer modulo 10^9 +7.

Fibonacci number is calculated using the following formula:
F(n) = F(n-1) + F(n-2), 
Where, F(1) = F(2) = 1.
For Example:
For ‘N’ = 5, the output will be 5.
Problem approach

Given a number N, figure out if it is a member of fibonacci series or not. Return true if the number is member of fibonacci series else false.
Fibonacci Series is defined by the recurrence.
F(n) = F(n-1) + F(n-2)
where F(0) = 0 and F(1) = 1

Try solving now

2. Detect And Remove Cycle

Easy
10m average time
90% success
0/40
Asked in companies
WalmartOracleGoldman Sachs

You have been given a Singly Linked List of integers, determine if it forms a cycle or not. If there is a cycle, remove the cycle and return the list.

A cycle occurs when a node's ‘next’ points back to a previous node in the list.

Problem approach

Given a singly linked list, you must detect the loop and remove it from the linked list if present. You need to make changes to the given linked list itself and return the updated linked list. Expected Complexity: Aim for O(n) time complexity and O(1) space complexity, where n is the number of nodes in the linked list.

Try solving now
03
Round
Easy
Video Call
Duration60 mins
Interview date22 Feb 2023
Coding problem2

1. Minimum Spanning Tree

Moderate
34m average time
0/80
Asked in companies
AmazonWells FargoMicrosoft

You are given an undirected, connected and weighted graph G(V, E), consisting of V number of vertices (numbered from 0 to V-1) and E number of edges.

Find and print the total weight of the Minimum Spanning Tree (MST) using Kruskal's algorithm.

By definition, a minimum weight spanning tree is a subset of the edges of a connected, edge-weighted undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight.

Problem approach

Find and print the total weight of the Minimum Spanning Tree (MST) using Kruskal's algorithm. By definition, a minimum weight spanning tree is a subset of the edges of a connected, edge-weighted, undirected graph that connects all the vertices together without any cycles and with the minimum possible total edge weight.

Try solving now

2. Next Greater Element

Easy
10m average time
90% success
0/40
Asked in companies
IBMInfo Edge India (Naukri.com)Amazon

You are given an array 'a' of size 'n'.



The Next Greater Element for an element 'x' is the first element on the right side of 'x' in the array, which is greater than 'x'.


If no greater elements exist to the right of 'x', consider the next greater element as -1.


For example:
Input: 'a' = [7, 12, 1, 20]

Output: NGE = [12, 20, 20, -1]

Explanation: For the given array,

- The next greater element for 7 is 12.

- The next greater element for 12 is 20. 

- The next greater element for 1 is 20. 

- There is no greater element for 20 on the right side. So we consider NGE as -1.
Problem approach

You have been given an array/list ‘ARR’ consisting of ‘N’ positive integers. Your task is to return the Next Greater Element(NGE) for every element.

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
SDE - 1
3 rounds | 5 problems
Interviewed by ThoughtSpot
2224 views
2 comments
0 upvotes
SDE - 1
3 rounds | 5 problems
Interviewed by ThoughtSpot
1416 views
0 comments
0 upvotes
SDE - 1
3 rounds | 6 problems
Interviewed by ThoughtSpot
1161 views
0 comments
0 upvotes
Frontend developer II
3 rounds | 7 problems
Interviewed by ThoughtSpot
674 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