PolicyBazaar.com interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

PolicyBazaar.com
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: OOPS, core java, DBMS, SQL & PL/SQL, Data Structures and Algorithms, UI (HTML, JS), SDLC, Java 8 concepts, UML diagrams, Collections, Multithreading, Exception Handling, Hashing, Recursion problems.
Tip
Tip

Tip 1 : Practice more problem solving questions
Tip 2 : understand the comcepts in depth
Tip 3 : try to work on onw or two handson project to get more experience in that stack.

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

Tip 1 : Add some good projects on resume
Tip 2 : put things which you know well and not technologies which you don't know.

Interview rounds

01
Round
Easy
Video Call
Duration45 minutes
Interview date14 Oct 2022
Coding problem2

1. Regular Expression Match

Easy
10m average time
90% success
0/40
Asked in companies
HCL TechnologiesAckoAmazon

Given a string ‘str’ and a string ‘pat’. The string s has some wildcard characters i.e ‘?’ and ‘*’.

If any character is a ‘?’ we can replace that character with any other character. 

If a character is a * we can replace * with any sequence of characters including the empty sequence.  

Your task is to determine if it is possible that we can make ‘str' = 'pat’ using appropriate conversions in ‘str’.

For example:
Let str = “abc?" and pat= “abcd”

We return true as ‘?’ can be replaced with ‘d’ and this makes ‘str’ and ‘pat’ same.
Problem approach

Given a string ‘str’ and a string ‘pat’. The string s has some wildcard characters i.e ‘?’ and ‘*’.
If any character is a ‘?’ we can replace that character with any other character. 

If a character is a * we can replace * with any sequence of characters including the empty sequence. 
Your task is to determine if it is possible that we can make ‘str' = 'pat’ using appropriate conversions in ‘str’.
For Example:
Let str = “abc?" and pat= “abcd”

We return true as ‘?’ can be replaced with ‘d’ and this makes ‘str’ and ‘pat’ same.

Try solving now

2. Minimum Depth Of Binary Tree

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

You have been given a Binary Tree of integers, find the minimum depth of this Binary Tree. The minimum depth of a Binary Tree is the number of nodes along the shortest path from the root node down to the nearest leaf node.

Note:
A leaf is a node with no children.
For example:
For the given binary tree

alt text

Output: 2
The shortest path is from root node 1 to leaf node 2 which contains 2 nodes in the path. Hence, the minimum depth is 2.
Problem approach

You have been given a Binary Tree of integers, find the minimum depth of this Binary Tree. The minimum depth of a Binary Tree is the number of nodes along the shortest path from the root node down to the nearest leaf node.
Note:
A leaf is a node with no children.

Try solving now
02
Round
Easy
Video Call
Duration45 minutes
Interview date14 Oct 2022
Coding problem2

1. LCA Of Binary Tree

Moderate
10m average time
90% success
0/80
Asked in companies
GrabDisney + HotstarShareChat

You have been given a Binary Tree of distinct integers and two nodes ‘X’ and ‘Y’. You are supposed to return the LCA (Lowest Common Ancestor) of ‘X’ and ‘Y’.


The LCA of ‘X’ and ‘Y’ in the binary tree is the shared ancestor of ‘X’ and ‘Y’ that is located farthest from the root.


Note :
You may assume that given ‘X’ and ‘Y’ definitely exist in the given binary tree.
For example :
For the given binary tree

Example

LCA of ‘X’ and ‘Y’ is highlighted in yellow colour.
Problem approach

You have been given a Binary Tree of distinct integers and two nodes ‘X’ and ‘Y’. You are supposed to return the LCA (Lowest Common Ancestor) of ‘X’ and ‘Y’.
The LCA of ‘X’ and ‘Y’ in the binary tree is the shared ancestor of ‘X’ and ‘Y’ that is located farthest from the root.

Try solving now

2. Jump Game

Moderate
40m average time
35% success
0/80
Asked in companies
WalmartGrowwPolicyBazaar.com

Given an array of non-negative integers ‘ARR’ of length ‘N’, you are initially positioned at the array's first index.

Each element in the array represents your maximum jump length at that position.

Return the minimum number of jumps required to reach the last index.

If it is not possible to reach the last index, return -1.

Example:
Input:

‘N’ = 3
‘ARR’ = [ 2, 1, 1 ]

The shortest way to reach index 2 is
Index 0 => Index 2
that requires only 1 jump.
Problem approach

You have been given an array 'ARR' of ‘N’ integers. You have to find the minimum number of jumps needed to reach the last index of the array i.e ‘N - 1’ if at any index ‘i’ we can jump to an index ‘i + k’ such that 1<= ‘k’ <= ARR[i] i.e the element you are currently at represents the maximum distance you can jump from the current element.
Your goal is to reach the last index in the minimum number of jumps.
Assume that, under the given constraints, you can always reach the last index.
Note:
Consider 0 based indexing.

Try solving now

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
SDE - 1
2 rounds | 4 problems
Interviewed by PolicyBazaar.com
1246 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by PolicyBazaar.com
920 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by PolicyBazaar.com
911 views
0 comments
0 upvotes
SDE - 1
2 rounds | 5 problems
Interviewed by PolicyBazaar.com
870 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes