Josh Technology Group interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Josh Technology Group
upvote
share-icon
3 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, Database Management Systems, Object Orientated Programing, Operating Systems, Computer Networks
Tip
Tip

Tip 1 : Consistency
Tip 2 : Never Give Up
Tip 3 : Learn from the mistakes

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

Tip 1 : Simple and short providing the required information
Tip 2 : Single page resume with showing all the multiple projects which have done.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration50 minutes
Interview date17 Jan 2022
Coding problem0

Online MCQ Test on Calyxpod platform:- Questions from Aptitude, OS, DBMS, DSA
Set of 50 simple MCQs on C++, aptitude, and logical. Only those who cleared the objective round were allowed to sit for the subjective round.

02
Round
Medium
Face to Face
Duration60 minutes
Interview date18 Jan 2022
Coding problem3

In this round, we had to write the whole program along with appropriate comments. The code should contain explanations wherever required. Many students who wrote the correct code and passed all test cases were not shortlisted because they forgot to write the comments. You could even include some edge cases in the comments and how they are being handled.

The majority of questions were asked on trees and linked lists. (and a little bit of DP). There was a total of 3 technical rounds followed by an HR Round. In each technical round, we were asked 2 questions. Sometimes if the candidate is unable to come up with the solution to any of the problems then another question is added (depends on the interviewer’s mood).

1. Flatten Binary Tree to Linked List

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

You are given a binary tree consisting of 'n' nodes.


Convert the given binary tree into a linked list where the linked list nodes follow the same order as the pre-order traversal of the given binary tree.


Use the right pointer of the binary tree as the “next” pointer for the linked list and set the left pointer to NULL.


Use these nodes only. Do not create extra nodes.


Example :
Input: Let the binary be as shown in the figure:

Example Tree

Output: Linked List: 15 -> 40 -> 62 -> 10 -> 20 -> NULL

Explanation: As shown in the figure, the right child of every node points to the next node, while the left node points to null.

Also, the nodes are in the same order as the pre-order traversal of the binary tree.
Problem approach

A simple solution is to use Level Order Traversal using Queue. In level order traversal, keep track of previous node. Make current node as right child of previous and left of previous node as NULL. This solution requires queue, but question asks to solve without additional data structure.

Recursively look for the node with no grandchildren and both left and right child in the left sub-tree. Then store node->right in temp and make node->right=node->left. Insert temp in first node NULL on right of node by node=node->right. Repeat until it is converted to linked list.

Try solving now

2. Sort an array in wave form

Easy
10m average time
85% success
0/40
Asked in companies
AmazonSAP LabsExpedia Group

You have been given an unsorted array ‘ARR’.

Your task is to sort the array in such a way that the array looks like a wave array.

Example:
If the given sequence ‘ARR’ has ‘N’ elements then the sorted wave array looks like - 
‘ARR[0] >= ARR[1]’ and ‘ARR[1] <= ARR[2]’
‘ARR[2] >= ARR[3]’ and ‘ARR[3] <= ARR[4]’
‘ARR[4] >= ARR[5]’ and ‘ARR[5] <= ARR[6]’  And so on.
Note:
1. ‘ARR[0]’ must be greater than or equal to ‘ARR[1]’.

2. There can be multiple arrays that look like a wave array but you have to return only one.

3. We have an internal function that will check your solution and return 'True' in case your array is one of the solutions otherwise return 'False'.

Explanation

The given array ‘ ARR = { 4, 3, 5, 2, 3, 1, 2 } ’
The below figure is a visual representation of the given ‘ARR’ and you can see we can express ‘ARR’ in a waveform array because 
4>3 and 3<5 
5>2 and 2<3
3>1 and 1<2
And it follows the condition of wave array.

subsequence

Follow up:
Try to solve this problem in linear time complexity.
Try solving now

3. Rotated Array

Moderate
10m average time
90% success
0/80
Asked in companies
OlaAmazonMorgan Stanley

You are given an array 'arr' of size 'n' having unique elements that has been sorted in ascending order and rotated between 1 and 'n' times which is unknown.


The rotation involves shifting every element to the right, with the last element moving to the first position. For example, if 'arr' = [1, 2, 3, 4] was rotated one time, it would become [4, 1, 2, 3].


Your task is to find the minimum number in this array.


Note :
All the elements in the array are distinct. 


Example :
Input: arr = [3,4,5,1,2]

Output: 1

Explanation: The original array was [1,2,3,4,5] and it was rotated 3 times.


Problem approach

If we take closer look at examples, we can notice that the number of rotations is equal to index of minimum element. A simple linear solution is to find minimum element and returns its index.
Time Complexity : O(n) 
Auxiliary Space : O(1)

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.

Time Complexity : O(Log n) 
Auxiliary Space : O(Log n)

Try solving now
03
Round
Easy
HR Round
Duration60 minutes
Interview date21 Jan 2022
Coding problem0

Tell me about yourself.
Why do you want to join our organisation?
One weakness.
What if you are asked to work for more than 10 hours every day for a month?

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 Josh Technology Group
1522 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Josh Technology Group
1027 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by Josh Technology Group
1486 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by Josh Technology Group
1160 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
2198 views
0 comments
0 upvotes