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

Software Engineer Intern

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

Interview preparation journey

expand-icon
Journey
After being accepted into a Tier 1 college, my journey in coding began. Although I did most of my coding during my final years, I regret not starting earlier.
Application story
This is a campus opportunity. The company visited our college and administered an online assessment exam. Out of 53 students, 6 were selected for the interview.
Why selected/rejected for the role?
I was rejected because I lacked substantial projects on my resume and couldn't answer all the questions.
Preparation
Duration: 4 months
Topics: Data Structures, Computer Network,DevOps, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Complete 500 high-quality questions. 

Tip 2: Include several substantial projects on your resume.

Application process
Where: Campus
Eligibility: Above 6 CGPA
Resume Tip
Resume tip

Tip 1: Include projects on your resume. 

Tip 2: Avoid fabricating information on your resume.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date26 Jan 2024
Coding problem2

1. Trapping Rain Water

Moderate
15m average time
80% success
0/80
Asked in companies
HCL TechnologiesCiti BankAtlassian

You have been given a long type array/list 'arr’ of size 'n’.


It represents an elevation map wherein 'arr[i]’ denotes the elevation of the 'ith' bar.



Note :
The width of each bar is the same and is equal to 1.
Example:
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].

Output: 10

Explanation: Refer to the image for better comprehension:

Alt Text

Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Problem approach

def trapRainWater(arr):
n = len(arr)
if n <= 2:
return 0

left, right = 0, n - 1
left_max, right_max = 0, 0
result = 0

while left < right:
if arr[left] < arr[right]:
if arr[left] >= left_max:
left_max = arr[left]
else:
result += left_max - arr[left]
left += 1
else:
if arr[right] >= right_max:
right_max = arr[right]
else:
result += right_max - arr[right]
right -= 1

return result

# Example usage:
elevation_map = [0,1,0,2,1,0,1,3,2,1,2,1]
print(trapRainWater(elevation_map)) # Output: 6

Try solving now

2. Balanced parentheses

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

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.

Note :

Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.

2. Open brackets must be closed in the correct order.

For Example :

()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Problem approach

Based on Stack

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date27 Jan 2024
Coding problem2

1. Longest Palindromic Subsequence

Hard
45m average time
50% success
0/120
Asked in companies
QualcommHikeSAP Labs

You have been given a string ‘A’ consisting of lower case English letters. Your task is to find the length of the longest palindromic subsequence in ‘A’.

A subsequence is a sequence generated from a string after deleting some or no characters of the string without changing the order of the remaining string characters. (i.e. “ace” is a subsequence of “abcde” while “aec” is not).

A string is said to be palindrome if the reverse of the string is the same as the actual string. For example, “abba” is a palindrome, but “abbc” is not a palindrome.

Problem approach

A string is said to be palindrome if the reverse of the string is the same as the actual string. For example, “abba” is a palindrome, but “abbc” is not a palindrome.

Try solving now

2. Minimum Number of Platforms

Moderate
30m average time
70% success
0/80
Asked in companies
MeeshoGrabAmazon

You have been given two arrays, 'AT' and 'DT', representing the arrival and departure times of all trains that reach a railway station.

Your task is to find the minimum number of platforms required for the railway station so that no train needs to wait.

Note :
1. Every train will depart on the same day and the departure time will always be greater than the arrival time. For example, A train with arrival time 2240 and departure time 1930 is not possible.

2. Time will be given in 24H format and colons will be omitted for convenience. For example, 9:05AM will be given as "905", or 9:10PM will be given as "2110".

3. Also, there will be no leading zeroes in the given times. For example, 12:10AM will be given as “10” and not as “0010”.
Problem approach

Our task is to find the minimum number of platforms required for the railway station so that no train needs to wait.

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 - Intern
2 rounds | 4 problems
Interviewed by PolicyBazaar.com
1158 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by PolicyBazaar.com
883 views
0 comments
0 upvotes
SDE - 1
2 rounds | 5 problems
Interviewed by PolicyBazaar.com
870 views
0 comments
0 upvotes
Technical Associate
3 rounds | 5 problems
Interviewed by PolicyBazaar.com
750 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer Intern
4 rounds | 4 problems
Interviewed by Microsoft
1378 views
0 comments
0 upvotes