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: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming,System Design
Tip
Tip

Tip 1 - Practice at Atleast 250 Questions
Tip 2 - Ex- Do at least 2 projects

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

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Hard
Video Call
Duration45 mins
Interview date17 Sep 2022
Coding problem2

1. Maximum XOR

Hard
10m average time
90% success
0/120
Asked in companies
Red HatErnst & Young (EY)Zippin

You are given two arrays of non-negative integers say ‘arr1’ and ‘arr2’. Your task is to find the maximum value of ( ‘A’ xor ‘B’ ) where ‘A’ and ‘B’ are any elements from ‘arr1’ and ‘arr2’ respectively and ‘xor’ represents the bitwise xor operation.

Problem approach

You are given an integer 'X' and your task is to find an integer 'Y' such that the bitwise XOR of the integers 'X' and 'Y' give the maximum possible value. The integer 'Y' should not be greater than 2305843009213693951 ((2^61) - 1).
A bitwise XOR is a binary operation that takes two bit patterns of equal length and performs the logical exclusive OR operation on each pair of corresponding bits. The result in each position is 1 if only one of the bits is 1, but will be 0 if both are 0 or both are 1.

Try solving now

2. Minimize the maximum difference between adjacent elements in an array

Easy
15m average time
85% success
0/40
Asked in companies
Urban Company (UrbanClap)SprinklrAmazon

You are given a non-decreasing array and an integer K. You need to remove exactly K integers from the given array such that the maximum difference between adjacent elements is minimum.

For example:
If the given array is: [2 6 7 7 10] and K = 2. We need to remove A[0] = 2 and A[4] = 10, then the resultant array would become [6 7 7], where the difference between adjacent pairs are {1, 0}. Thus our answer would be 1. You can see that there would not be any better answer than 1 for this array
Try solving now
02
Round
Hard
Video Call
Duration45 mins
Interview date17 Sep 2022
Coding problem2

1. Frequency In A Sorted Array

Easy
15m average time
85% success
0/40
Asked in companies
SprinklrOlaUrban Company (UrbanClap)

You are given a sorted array 'ARR' and a number 'X'. Your task is to count the number of occurrences of 'X' in 'ARR'.

Note :
1. If 'X' is not found in the array, return 0.
2. The given array is sorted in non-decreasing order.
Try solving now

2. Rotting Oranges

Moderate
20m average time
78% success
0/80
Asked in companies
Samsung R&D InstituteSalesforceSamsung

You have been given a grid containing some oranges. Each cell of this grid has one of the three integers values:

  • Value 0 - representing an empty cell.
  • Value 1 - representing a fresh orange.
  • Value 2 - representing a rotten orange.
  • Every second, any fresh orange that is adjacent(4-directionally) to a rotten orange becomes rotten.

    Your task is to find out the minimum time after which no cell has a fresh orange. If it's impossible to rot all the fresh oranges then print -1.

    Note:
    1. The grid has 0-based indexing.
    2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
    
    Problem approach

    You have been given a grid containing some oranges. Each cell of this grid has one of the three integers values:
    Value 0 - representing an empty cell.
    Value 1 - representing a fresh orange.
    Value 2 - representing a rotten orange.
    Every second, any fresh orange that is adjacent(4-directionally) to a rotten orange becomes rotten.
    Your task is to find out the minimum time after which no cell has a fresh orange. If it's impossible to rot all the fresh oranges then print -1.

    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
    883 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 | 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