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
Journey
In the lockdown period, I started my journey to where I am today. When the first lockdown prevailed I started to learn DSA, and I think that was the best time to learn DSA because no pressure from college was there for its useless assignments and all. In the lockdown of around 6 months, I learnt the basic algorithms and at the end I started practising on leetcode and codechef like platforms, they helped me a lot during my journey.
Application story
I got to know about the openings and that the hiring drive of Unthinkable Solutions is going to visit our college for hiring candidates as SDE-1. I prepared myself for the same and after the selection process, I got the offer letter.
Why selected/rejected for the role?
I think I had the appropriate skills and a good amount of knowledge to prove that I was the right man for the post. I also solved coding questions in the optimal manner.
Preparation
Duration: 2.5 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Practice at least 250 Questions
Tip 2 : Do atleast two projects

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

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

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 minutes
Interview date20 Aug 2021
Coding problem3

1. Reverse Subarray To Maximize Array Value

Hard
45m average time
55% success
0/120
Asked in companies
AppleUnthinkable Solutions

You are given an array of integers ‘NUMS’. The beauty of this array can be defined as:

The sum of absolute difference of each two consecutive elements.

In one operation you can reverse one subarray of ‘NUMS’. Your task is to find maximum beauty by performing the operation exactly once.

Problem approach

A Simple Solution is to create an auxiliary array, copy contents of given array to auxiliary array. Finally traverse the auxiliary array and update given array using copied values. Time complexity of this solution is O(n), but it requires O(n) extra space.
An efficient solution can solve the problem in O(n) time and O(1) space. The idea is to keep track of previous element in loop.

Try solving now

2. Reverse List In K Groups

Hard
15m average time
85% success
0/120
Asked in companies
SAP LabsSamsungIBM

You are given a linked list of 'n' nodes and an integer 'k', where 'k' is less than or equal to 'n'.


Your task is to reverse the order of each group of 'k' consecutive nodes, if 'n' is not divisible by 'k', then the last group of nodes should remain unchanged.


For example, if the linked list is 1->2->3->4->5, and 'k' is 3, we have to reverse the first three elements, and leave the last two elements unchanged. Thus, the final linked list being 3->2->1->4->5.


Implement a function that performs this reversal, and returns the head of the modified linked list.


Example:
Input: 'list' = [1, 2, 3, 4], 'k' = 2

Output: 2 1 4 3

Explanation:
We have to reverse the given list 'k' at a time, which is 2 in this case. So we reverse the first 2 elements then the next 2 elements, giving us 2->1->4->3.


Note:
All the node values will be distinct.


Try solving now

3. Rotate Linked List

Moderate
25m average time
65% success
0/80
Asked in companies
Morgan StanleyGeeksforGeeksPharmEasy

You are given a linked list having ‘n’ nodes and an integer ‘k’.


You have to rotate the linked list to the right by ‘k’ positions .


Example :
Input: linked list = [1 2 3 4] , k = 2

Output: 3 4 1 2

Explanation:
We have to rotate the given linked list to the right 2 times. After rotating it to the right once it becomes 4->1->2->3. After rotating it to the right again, it becomes 3->4->1->2. 


Problem approach

To rotate the linked list, we need to change the next pointer of kth node to NULL, the next pointer of the last node should point to previous head node, and finally, change the head to (k+1)th node. So we need to get hold of three nodes: kth node, (k+1)th node, and last node. 
Traverse the list from the beginning and stop at kth node. Store pointer to kth node. We can get (k+1)th node using kthNode->next. Keep traversing till the end and store a pointer to the last node also. Finally, change pointers as stated above.

Try solving now
02
Round
Easy
Video Call
Duration45 minutes
Interview date27 Aug 2021
Coding problem4

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

1. Search In Rotated Sorted Array

Easy
12m average time
85% success
0/40
Asked in companies
Disney + HotstarPhonePeArcesium

You have been given a sorted array/list 'arr' consisting of ‘n’ elements. You are also given an integer ‘k’.


Now the array is rotated at some pivot point unknown to you.


For example, if 'arr' = [ 1, 3, 5, 7, 8], then after rotating 'arr' at index 3, the array will be 'arr' = [7, 8, 1, 3, 5].


Now, your task is to find the index at which ‘k’ is present in 'arr'.


Note :
1. If ‘k’ is not present in 'arr', then print -1.
2. There are no duplicate elements present in 'arr'. 
3. 'arr' can be rotated only in the right direction.


Example:
Input: 'arr' = [12, 15, 18, 2, 4] , 'k' = 2

Output: 3

Explanation:
If 'arr' = [12, 15, 18, 2, 4] and 'k' = 2, then the position at which 'k' is present in the array is 3 (0-indexed).


Problem approach

Here also we find the index of minimum element, but using Binary Search. The idea is based on the below facts :


The minimum element is the only element whose previous is greater than it. If there is no previous element, then there is no rotation (first element is minimum). We check this condition for middle element by comparing it with (mid-1)’th and (mid+1)’th elements.
If the minimum element is not at the middle (neither mid nor mid + 1), then minimum element lies in either left half or right half.
If middle element is smaller than last element, then the minimum element lies in left half
Else minimum element lies in right half.

Try solving now

2. Reverse string Word Wise

Moderate
0/80
Asked in companies
IBMIONBirdEye

Reverse the given string word wise. That is, the last word in given string should come at 1st place, last second word at 2nd place and so on. Individual words should remain as it is.

Problem approach

Initially, reverse the individual words of the given string one by one, for the above example, after reversing individual words the string should be “i ekil siht margorp yrev hcum”.
Reverse the whole string from start to end to get the desired output “much very program this like i” in the above example.

Try solving now

3. Top View Of Binary Tree

Moderate
25m average time
70% success
0/80
Asked in companies
MicrosoftMakeMyTripOYO

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

Difference between delete and truncate. (Learn)

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
SDE - 1
3 rounds | 6 problems
Interviewed by Unthinkable Solutions
1442 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by Unthinkable Solutions
2170 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Unthinkable Solutions
881 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Unthinkable Solutions
1153 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6365 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
2197 views
0 comments
0 upvotes