Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
PolicyBazaar.com interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

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

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures and Algorithms, Object-Oriented Programming System, Operating system, Database Management System, Dynamic Programming
Tip
Tip

Try to do Data Structures and Algorithms based questions and firstly attempt it yourself before going to the solution, also try to do it as quickly as you can. Also prepare for theory subjects like Operating system, Database Management System, etc which I prepared through Coding Ninjas subjective notes and they are very accurate and up to mark.

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

Keep your resume simple and complete. Mention some good level projects, your previous experiences and coding achievements if any.

Interview rounds

01
Round
Easy
Video Call
Duration45 minutes
Interview date6 Sep 2022
Coding problem2

1. Transpose of a Matrix

Easy
15m average time
80% success
0/40
Asked in companies
OracleZS AssociatesSiemens

You are given a matrix ‘MAT’. Print and return the transpose of the matrix. The transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of a matrix A[][] is obtained by changing A[i][j] to A[j][i].

For example:
Let matrix be : 
1 2
3 4

Then transpose of the matrix will be: 
1 3
2 4
Problem approach

You are given a matrix ‘MAT’. Print the transpose of the matrix. The transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of a matrix A[][] is obtained by changing A[i][j] to A[j][i].
For Example:
Let matrix be : 
1 2
3 4

Then transpose of the matrix will be: 
1 3
2 4

Try solving now

2. Find Nth Prime

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

You are given a number 'N'. Your task is to find Nth prime number.

A prime number is a number greater than 1 that is not a product of two smaller natural numbers. Prime numbers have only two factors – 1 and the number itself.

Any number greater than 0 is a natural number i.e. natural numbers N = {1, 2, 3, 4,....}

For example:-

If you are asked to find the 7th prime number, it’ll be 17 because the first 7 prime numbers are 2, 3, 5, 7, 11, 13, 17.

Note: 1 is not a prime number.

Follow Up:
Try to solve the problem in O(N).
Problem approach

You are given a number 'N'. Your task is to find Nth prime number.
A prime number is a number greater than 1 that is not a product of two smaller natural numbers. Prime numbers have only two factors – 1 and the number itself.
Any number greater than 0 is a natural number i.e. natural numbers N = {1, 2, 3, 4,....}
For example:-
If you are asked to find the 7th prime number, it’ll be 17 because the first 7 prime numbers are 2, 3, 5, 7, 11, 13, 17.

Try solving now
02
Round
Easy
Video Call
Duration45 minutes
Interview date6 Sep 2022
Coding problem1

1. LRU Cache Implementation

Moderate
25m average time
65% success
0/80
Asked in companies
ZomatoQualcommOracle

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.

2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
You will be given ‘Q’ queries. Each query will belong to one of these two types:
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
Note :
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).

2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
Problem approach

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:
1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.

2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
You Will Be Given ‘Q’ Queries. Each Query Will Belong To One Of These Two Types:
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
Note :
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).

2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.

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

In DBMS, a recursive relationship is a relationship between an entity and ________.

Choose another skill to practice
Start a Discussion
Similar interview experiences
SDE - Intern
2 rounds | 4 problems
Interviewed by PolicyBazaar.com
775 views
0 comments
0 upvotes
SDE - 1
2 rounds | 5 problems
Interviewed by PolicyBazaar.com
547 views
0 comments
0 upvotes
Technical Associate
3 rounds | 5 problems
Interviewed by PolicyBazaar.com
425 views
0 comments
0 upvotes
Software Engineer Intern
2 rounds | 4 problems
Interviewed by PolicyBazaar.com
1678 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
13518 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
12639 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
9002 views
2 comments
0 upvotes