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 | 6 Coding problems

Interview preparation journey

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

Tip 1 : Practice Atleast 250 Questions
Tip 2 : Do atleast 2 projects
Tip 3 : practice basics of dsa

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

Tip 1 : show your projects
Tip 2 : highlight your skills

Interview rounds

01
Round
Medium
Online Coding Interview
Duration150 Minutes
Interview date15 Sep 2021
Coding problem3

3 coding question + 50 dsa

1. Majority element

Easy
15m average time
85% success
0/40
Asked in companies
AmazonInfo Edge India (Naukri.com)HCL Technologies

You have been given an array/list 'ARR' consisting of 'N' integers. Your task is to find the majority element in the array. If there is no majority element present, print -1.

Note:
A majority element is an element that occurs more than floor('N' / 2) times in the array.
Problem approach

Approach: The basic solution is to have two loops and keep track of the maximum count for all different elements. If maximum count becomes greater than n/2 then break the loops and return the element having maximum count. If the maximum count doesn’t become more than n/2 then the majority element doesn’t exist.
Algorithm: 
Create a variable to store the max count, count = 0
Traverse through the array from start to end.
For every element in the array run another loop to find the count of similar elements in the given array.
If the count is greater than the max count update the max count and store the index in another variable.
If the maximum count is greater than the half the size of the array, print the element. Else print there is no majority element.

Try solving now

2. Height of Binary Tree

Easy
15m average time
80% success
0/40
Asked in companies
CIS - Cyber InfrastructureExpedia GroupQuikr

The height of a tree is equal to the number of nodes on the longest path from the root to a leaf.


You are given an arbitrary binary tree consisting of 'n' nodes where each node is associated with a certain value.


Find out the height of the tree.


Example :
Input: Let the binary tree be:

Output: 2

Explanation: The root node is 3, and the leaf nodes are 1 and 2.

There are two nodes visited when traversing from 3 to 1.
There are two nodes visited when traversing from 3 to 2.

Therefore the height of the binary tree is 2.
Problem approach

maxDepth()
1. If tree is empty then return -1
2. Else
(a) Get the max depth of left subtree recursively i.e., 
call maxDepth( tree->left-subtree)
(a) Get the max depth of right subtree recursively i.e., 
call maxDepth( tree->right-subtree)
(c) Get the max of max depths of left and right 
subtrees and add 1 to it for the current node.
max_depth = max(max dept of left subtree, 
max depth of right subtree) 
+ 1
(d) Return max_depth

Try solving now

3. Find Number Of Islands

Moderate
34m average time
60% success
0/80
Asked in companies
WalmartShareChatAmazon

You are given a 2-dimensional array/list having N rows and M columns, which is filled with ones(1) and zeroes(0). 1 signifies land, and 0 signifies water.

A cell is said to be connected to another cell, if one cell lies immediately next to the other cell, in any of the eight directions (two vertical, two horizontal, and four diagonals).

A group of connected cells having value 1 is called an island. Your task is to find the number of such islands present in the matrix.

Problem approach

A cell in 2D matrix can be connected to 8 neighbours. So, unlike standard DFS(), where we recursively call for all adjacent vertices, here we can recursively call for 8 neighbours only. We keep track of the visited 1s so that they are not visited again.

Try solving now
02
Round
Hard
Online Coding Test
Duration60 Minutes
Interview date16 Sep 2021
Coding problem2

2 coding questions

1. Maximum length pair chain

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

You are given ‘N’ pairs of integers in which the first number is always smaller than the second number i.e in pair (a,b) -> a < b always. Now we define a pair chain as the continuous arrangement of pairs in which a pair (c,d) can follow another pair (a,b) only when b < c.

Find the length of the longest pair chain that can be formed using the given pairs.

Example:
Given Pairs =  [3,4], [1,2], [2,3].

The length of the maximum chain will be 2. The longest chain is [1,2] -> [3,4].
Note:
1. You can select a pair only once.

2. You needn’t use up all the given pairs.

3. You can select pairs in any order. 
Problem approach

This problem is a variation of standard Longest Increasing Subsequence problem. Following is a simple two step process. 
1) Sort given pairs in increasing order of first (or smaller) element. Why do not need sorting? Consider the example {{6, 8}, {3, 4}} to understand the need of sorting. If we proceed to second step without sorting, we get output as 1. But the correct output is 2. 
2) Now run a modified LIS process where we compare the second element of already finalized LIS with the first element of new LIS being constructed.

Try solving now

2. Best Time to Buy and Sell

Moderate
20m average time
80% success
0/80
Asked in companies
HCL TechnologiesGoldman SachsMakeMyTrip

You are given an array(PRICES) of stock prices for N consecutive days. Your task is to find the maximum profit that you can make by completing as many transactions as you like, where a transaction denotes buying one and selling one share of the stock.

Note:

You must sell the stock before you buy it again.
Problem approach

If we are allowed to buy and sell only once, then we can use the following algorithm. Maximum difference between two elements. Here we are allowed to buy and sell multiple times. 
Following is the algorithm for this problem. 

Find the local minima and store it as starting index. If not exists, return.
Find the local maxima. And store it as an ending index. If we reach the end, set the end as the ending index.
Update the solution (Increment count of buy-sell pairs)
Repeat the above steps if the end is not reached.

Try solving now
03
Round
Medium
Face to Face
Duration45 minutes
Interview date23 Sep 2021
Coding problem1

Data structures,java script,web dev related questions,dbms questions

1. System Design Question

Design a Web Crawler.

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