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

Software Developer

Josh Technology Group
upvote
share-icon
6 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 8 months
Topics: Linked list, Tree, Graph, Dynamic Programming, Recursion, Backtracking
Tip
Tip

Tip 1 : Try to solve some good questions from every topic.
Tip 2 : If not have much time, then you can solve top interview questions from Leetcode.
Tip 3 : Made 2-3 good projects using any technology

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Keep resume short and crispy.
Tip 2 : Add coding profile handles and github link.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration50 minutes
Interview date27 Aug 2021
Coding problem0

It was approx 50 minutes round consist 50 questions, student who was able to did 30 correct answer, qualified for the second round.

02
Round
Medium
Online Coding Test
Duration60 minutes
Interview date27 Aug 2021
Coding problem1

Students who qualified in first round gets link for this round, this round had 4 questions in total, out of which 1 was output based and 3 was DSA based.

1. Validate Binary Tree Nodes

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

You are given ‘N’ binary tree nodes numbered from 0 to N - 1 where node ‘i’ has two children LEFT_CHILD[i] and RIGHT_CODE[i]. Return ‘True’ if and only if all the given nodes form exactly one valid binary tree. If node ‘i’ has no left child then 'LEFT_CHILD[i]' will equal -1, similarly for the right child.

Example:

Let’s say we have n=4 nodes, 'LEFT_CHILD' = {1, -1, 3, -1} and 
RIGHT_CHILD = {2, -1, -1, -1}. So the resulting tree will look like this:

It will return True as there is only one valid binary tree and each node has only one parent and there is only one root.
Problem approach

I used level order traversal concept to solve this problem

Try solving now
03
Round
Medium
Online Coding Test
Duration75 minutes
Interview date27 Aug 2021
Coding problem1

This round was of 70-75 minutes and had 3 coding questions of easy to medium level. There was some restrictions like we cannot use built-in functions in both second and third subjective round.

1. Balanced Binary Tree

Moderate
30m average time
50% success
0/80
Asked in companies
DunzoJosh Technology GroupHashedIn

You are given an integer 'H'. Your task is to count and print the maximum number of balanced binary trees possible with height 'H'.

The balanced binary tree is one in which, for every node, the difference between the left and right subtree heights is less than or equal to 1.

You have to print the answer with modulo 1e9+7.

For Example:
Input:
H = 2

Output: 
3

There will be a total 3 different balanced binary trees with height 2. 
One node as a root and other nodes on one of the two sides.
One with root and left subtree with one more node than right.
One with root and right subtree with one more node than left. 
Problem approach

I used postorder tee traversal to solve this problem, first go on left subtree and return the height, similarly gets height of right subtree and check if absolute difference is less than or equal to 1.

Try solving now
04
Round
Medium
Video Call
Duration60 minutes
Interview date1 Sep 2021
Coding problem2

This was face to face interview round of 60 minutes. It was mostly based on DSA, some questions was also asked related to my projects and DBMS. Interviewer was kind and good.

1. Sort an array in wave form

Easy
10m average time
85% success
0/40
Asked in companies
AdobeSAP 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.
Problem approach

Step 1 : I explained her naive approach by sorting the linked list in O(n.log(n)) TC.,
Step 2 : interviewer asked me to optimise it.
Step 3 : After thinking sometime I told her the solution in O(n) TC, this time she seems to be happy and asked me to write the code.

Try solving now

2. Maximum Sum BST

Hard
50m average time
55% success
0/120
Asked in companies
AmazonOLX GroupExpedia Group

You are given a Binary Tree ‘root’. The given Binary Tree may or may not be a Binary Search Tree(BST) itself. Your task is to find the maximum sum of node values of any subtree that is a Binary Search Tree(BST).

Binary Search Tree is defined as follows:
1) If the left subtree exists it should contain only nodes with values less than the current node's value.

2) If the right subtree exists it should contain only nodes with values greater than the current node's value.

3) Both the left and right subtrees should also be Binary Search Tree.
Example :

For the above binary tree, the BST with the maximum possible sum is marked with RED colour, the sum of this BST is equal to 6.

 

Problem approach

Step 1 : I break this problem into two parts, whether the subtree is BST or not and sum of subtree and then told the approach to the interviewer, I was using some space to store values like sum of subtree, but interviewer denied for this and asked me to optimise, then I optimise it.

Try solving now
05
Round
Hard
Face to Face
Duration135 minutes
Interview date6 Sep 2021
Coding problem2

This was the final technical round, it was around 2.5 hours long and based on mostly DSA and little bit Projects, DBMS, OS. Josh mainly focus on DSA and on Tree Data Structure in interview.

1. Pair Sum in BST.

Easy
15m average time
85% success
0/40
Asked in companies
HikeDunzoPayPal

You are given a Binary Search Tree (BST) and a target value ‘K’. Your task is to return true if there exist two nodes in the given BST such that the sum of their values is equal to the given target ‘K’, else return false.


A binary search tree (BST) is a binary tree data structure which has the following properties.

• The left subtree of a node contains only nodes with data less than the node’s data.

• The right subtree of a node contains only nodes with data greater than the node’s data.

• Both the left and right subtrees must also be binary search trees.


Note:
1. All the elements of the Binary Search Tree are unique.

2. You can’t use the same node value/element of BST twice.


For example:
tree: 8 5 10 2 6 -1 -1 -1 -1 -1 7 -1 -1
'K' = 13,

The nodes with values 8 and 5 as shown in the above figure gives sum equal to the given target 13. 

Therefore, the output will be “true” i.e it is possible to find a pair in the given BST having sum equal to ‘K’.
Problem approach

Step 1 : Earlier, this question seems to be very easy, I told the approach using O(n) TC and O(n) SC, then interviewer asked me to optimise the SC.

Step 2 : I told the another approach using O(n(logn)) TC and O(1) SC, but again interviewer was not happy and this time she asked me to optimise TC.

Step 3 : After lot of thinking, I cam up with the solution using Stack DS, that takes O(n) TC and O(heigh_of_tree) SC, this was the approach interviewer was looking for, he asked me to write the code

Try solving now
Hard
20m average time
80% success
0/120
Asked in companies
Goldman SachsUberApple

You are given an arbitrary binary tree, a node of the tree, and an integer 'K'. You need to find all such nodes which have a distance K from the given node and return the list of these nodes.


Distance between two nodes in a binary tree is defined as the number of connections/edges in the path between the two nodes.


Note:

1. A binary tree is a tree in which each node has at most two children. 
2. The given tree will be non-empty.
3. The given tree can have multiple nodes with the same value.
4. If there are no nodes in the tree which are at distance = K from the given node, return an empty list.
5. You can return the list of values of valid nodes in any order. For example if the valid nodes have values 1,2,3, then you can return {1,2,3} or {3,1,2} etc.
Example :

Sample Output 2 explanation

Consider this tree above. The target node is 5 and K = 3. The nodes at distance 1 from node 5 are {2}, nodes at distance 2 from node 5 are {1, 4} and nodes at distance 3 from node 5 are {6, 3}.
Problem approach

Step 1 : Firstly, I gave BFS solution, first find the parent of every node of tree and then push pair of target_node, distance(k) in the queue, run the loop till queue is not empty and each time pop the top pair from queue and check if pair.second(distance) is 0 then add pair.first(node) in answer vector otherwise push pair.first right, left and parent(if exists), dis-1 in the queue.

Step 2 : Interviewer asked me to optimise the SC.

Step 3 : I told the approach using DFS in constant space, this time interviewer asked me to write the code.

Try solving now
06
Round
Easy
HR Round
Duration20 minutes
Interview date6 Sep 2021
Coding problem1

This was the simple 20 minutes round

1. Basic HR Questions

In this interviewer asked me about my family, residence and if I will have any issue in relocating to Gurgaon. After 30 minutes of this round they send me mail regarding my selection.

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
company logo
Software Developer
3 rounds | 5 problems
Interviewed by Josh Technology Group
922 views
0 comments
0 upvotes
company logo
Associate Enginner
3 rounds | 5 problems
Interviewed by Josh Technology Group
982 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by Josh Technology Group
1460 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by Josh Technology Group
1140 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Developer
3 rounds | 3 problems
Interviewed by HCL Technologies
3393 views
1 comments
0 upvotes
company logo
Software Developer
3 rounds | 6 problems
Interviewed by Arcesium
1684 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 5 problems
Interviewed by HCL Technologies
4080 views
0 comments
0 upvotes