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

SDE - 1

Unthinkable Solutions
upvote
share-icon
2 rounds | 7 Coding problems

Interview preparation journey

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

Tip 1 : Practice Atleast 250 Questions
Tip 2 : Practice Atleast 250 Questions
Tip 3 : Take time to study DSA

Application process
Where: Campus
Eligibility: 6.5 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
Medium
Online Coding Test
Duration60 minutes
Interview date18 Aug 2021
Coding problem3

there were 4 questions in the Online Assessment round

1. Minimum Jumps

Moderate
25m average time
75% success
0/80
Asked in companies
WalmartDirectiMakeMyTrip

Bob lives with his wife in a city named Berland. Bob is a good husband, so he goes out with his wife every Friday to ‘Arcade’ mall.

‘Arcade’ is a very famous mall in Berland. It has a very unique transportation method between shops. Since the shops in the mall are laying in a straight line, you can jump on a very advanced trampoline from the shop i, and land in any shop between (i) to (i + Arr[i]), where Arr[i] is a constant given for each shop.

There are N shops in the mall, numbered from 0 to N-1. Bob's wife starts her shopping journey from shop 0 and ends it in shop N-1. As the mall is very crowded on Fridays, unfortunately, Bob gets lost from his wife. So he wants to know, what is the minimum number of trampoline jumps from shop 0 he has to make in order to reach shop N-1 and see his wife again. If it is impossible to reach the last shop, return -1.

Problem approach

Approach: A naive approach is to start from the first element and recursively call for all the elements reachable from first element. The minimum number of jumps to reach end from first can be calculated using minimum number of jumps needed to reach end from the elements reachable from first. 

minJumps(start, end) = Min ( minJumps(k, end) ) for all k reachable from start

Try solving now

2. Time to publish comic books

Moderate
0/80
Asked in company
Unthinkable Solutions

Alice has decided to publish ‘X’ different comic books. For this purpose, he has ‘Y’ printing machines and ‘Z’ binding machines. The ‘ith’ printing machine takes ‘printMachine[i]’ minutes to print all pages of a comic book. Each binding machine takes ‘K’ minutes to bind all comic book pages.

At a single time, each machine(a printing or a binding) can process at most the pages of a single comic book.

For publishing a comic book, these steps have to be followed-

1. Start printing the pages of a comic book in an unoccupied ‘ith’ printing machine.
2. After ‘printMachine[i]' minutes, the printed pages are taken from the ‘ith’ printing machine.
3. After a non-negative amount of time, the printed pages of the comic book are placed in an unoccupied binding machine.
4. After ‘K’ minutes, the pages are removed from the binding machine.

Assume that the time is negligible for placing the pages into or removing them from the machines. You need to help Alice find the minimum time to publish X comics.

Example:

X=3, Y=2, Z=2, K=5
printMachine = [5, 7]

We can print the first book in the first printing machine at ‘T=0’, which takes five minutes. After that, we can give it to the first binding machine, which will bind it till ‘T=10’.
Similarly, we can print the second book in the second printing machine at ‘T=0’, which takes seven minutes. After that, we can give it to the second binding machine, which will bind it till ‘T=12’.
Hence, will finish both books in 12 minutes. So, the answer to this example will be 12.
Try solving now

3. 3Sum

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

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".
Problem approach

Approach: A simple method is to generate all possible triplets and compare the sum of every triplet with the given value. The following code implements this simple method using three nested loops.
Algorithm: 
Given an array of length n and a sum s
Create three nested loop first loop runs from start to end (loop counter i), second loop runs from i+1 to end (loop counter j) and third loop runs from j+1 to end (loop counter k)
The counter of these loops represents the index of 3 elements of the triplets.
Find the sum of ith, jth and kth element. If the sum is equal to given sum. Print the triplet and break.
If there is no triplet, then print that no triplet exist.

Try solving now
02
Round
Medium
Face to Face
Duration30 minutes
Interview date20 Aug 2021
Coding problem4

I was asked some theory questions from DSA , 2-3 coding problems , about my projects . Some typical DBMS questions

1. Find prime numbers

Easy
15m average time
80% success
0/40
Asked in companies
OracleMcAfeeGoldman Sachs

You are given a positive integer ‘N’. Your task is to print all prime numbers less than or equal to N.

Note: A prime number is a natural number that is divisible only by 1 and itself. Example - 2, 3, 17, etc.

You can assume that the value of N will always be greater than 1. So, the answer will always exist.

Problem approach

A naive solution is to iterate through all numbers from 2 to sqrt(n) and for every number check if it divides n. If we find any number that divides, we return false.

Try solving now

2. Cut Into Segments

Moderate
25m average time
75% success
0/80
Asked in companies
DunzoTata1mgUnthinkable Solutions

You are given an integer ‘N’ denoting the length of the rod. You need to determine the maximum number of segments you can make of this rod provided that each segment should be of the length 'X', 'Y', or 'Z'.

Try solving now

3. Top View Of Binary Tree

Moderate
25m average time
70% success
0/80
Asked in companies
MicrosoftThought WorksSamsung R&D Institute

You are given a Binary Tree of 'n' nodes.


The Top view of the binary tree is the set of nodes visible when we see the tree from the top.


Find the top view of the given binary tree, from left to right.


Example :
Input: Let the binary tree be:

Example

Output: [10, 4, 2, 1, 3, 6]

Explanation: Consider the vertical lines in the figure. The top view contains the topmost node from each vertical line.
Problem approach

Here we use the two variables, one for vertical distance of current node from the root and another for the depth of the current node from the root. We use the vertical distance for indexing. If one node with the same vertical distance comes again, we check if depth of new node is lower or higher with respect to the current node with same vertical distance in the map. If depth of new node is lower, then we replace it.

Try solving now

4. DBMS Question

Write an SQL query for finding the largest salary from the given table.

Here's your problem of the day

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

Skill covered: Programming

Which SQL clause is used to specify the conditions in a query?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Unthinkable Solutions
1380 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by Unthinkable Solutions
2134 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Unthinkable Solutions
857 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Unthinkable Solutions
1082 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6302 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
2176 views
0 comments
0 upvotes