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

Associate Software Engineer

IBM
upvote
share-icon
3 rounds | 11 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

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

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date14 Jun 2021
Coding problem2

It was an Aptitude test and Technical objective test of 30 minutes followed by a Coding test of 60 minutes.

1. Minimum number of swaps required to sort an array

Easy
10m average time
90% success
0/40
Asked in companies
SamsungAccentureAmerican Express

You have been given an array 'ARR' of 'N' distinct elements.

Your task is to find the minimum no. of swaps required to sort the array.

For example:
View more
Problem approach

Approach : 
1) The basic idea is to make a new array (called temp), which is a sorted form of the input array. 

2) Make a map that stores the elements and their corresponding index, of the input array. So at each i starting from 0 to N is in the given array, where N is the size of the array:

3) If i is not in its correct position according to the sorted array, then

View more
Try solving now

2. Evaluate Division

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

You are given an array of pairs of strings 'EQUATI...

View more
Problem approach

Approach : 

1) Iterate through the ‘EQUATIONS’ array; let’s say we are currently at index ‘i’.
1.1) Insert an edge from the numerator variable to the denominator variable with weight equal to ‘VALUES[i]'.
1.2) Also, insert an edge from the denominator variable to the numerator variable with a weight equal to 1 / ‘VALUES[i]’.

2) Iterate through the queries; let’s say the...

View more
Try solving now
02
Round
Medium
Video Call
Duration60 Minutes
Interview date14 Jun 2021
Coding problem4

This round had 1 question related to Graphs and then the rest of the questions were from OOPS.

1. Negative Cycle in a Directed Graph

Moderate
25m average time
75% success
0/80
Asked in company
IBM

You have been given a directed weighted graph of ‘N’ vertices labeled from 1 to 'N' and ‘M’ edges. Each edge connecting two nodes 'u' and 'v' has a weight 'w' denoting the distan...

View more
Problem approach

Approach (Using Bellman-Ford Algo) : 

1) Iterate on the source (vertex 1 to vertex ‘N’).
2) Make an array ‘D’ and initialize the array with an infinite value, except ‘D[source]’, ‘D[source]’ = 0.
3) Do ‘N’ iterations and in each iteration follow the below steps:
3.1) Iterate on the edges on the graph and for each edge (‘u’,’v’,’w’) update the value to ‘D[v]’, i.e., ‘D[v]’ =...

View more
Try solving now

2. OOPS Question

Difference between Constructor and Method?

Problem approach

Constructors :
1) A Constructor is a block of code that initializes a newly created object.
2) A Constructor can be used to initialize an object.
3) A Constructor is invoked implicitly by the system
4) A Constructor is invoked when a object is created using the keyword new.
5) A Constructor doesn’t have a return type.
6) A Constructor’s name must be same as the name of the cla...

View more

3. OOPS Question

Explain Singleton Class in Java

Problem approach

1) In object-oriented programming, a singleton class is a class that can have only one object (an instance of the
class) at a time.

2) After first time, if we try to instantiate the Singleton class, the new variable also points to the first instance created.

3) So whatever modifications we do to any variable inside the class through any instance, it affects the variable of the<...

View more

4. OOPS Question

What is Garbage collector in JAVA?

Problem approach

Answer :
1) Garbage Collection in Java is a process by which the programs perform memory management automatically.

2) The Garbage Collector(GC) finds the unused objects and deletes them to reclaim the memory.

3) In Java, dynamic memory allocation of objects is achieved using the new operator that uses some memory and the
memory remains allocated until there are references fo...

View more
03
Round
Medium
Video Call
Duration60 Minutes
Interview date14 Jun 2021
Coding problem5

This was a standard DSA round where I was asked to solve 1 question and also code it in a production ready manner. I was also tested on DBMS in this round. This round ended with the famous Die-Hard Puzzle.

1. Reverse Stack Using Recursion

Easy
21m average time
80% success
0/40
Asked in companies
AmazonOracleRazorpay

Reverse a given stack of 'N' integers using recursion. You are required to make changes in the input parameter itself.


View more
Problem approach

Algorithm :
1) ReverseStack(stack)
i) If the stack is empty, then return
ii) Pop the top element from the stack as top
iii) Reverse the remaining elements in the stack, call reverseStack(stack) method
iv) Insert the top element to the bottom of the stack, call InsertAtBottom(stack, top) method
2) InsertAtBottom(stack, ele)
i) If the stack is empty, push ele to stack, return...

View more
Try solving now

2. DBMS Question

What is meant by normalization and denormalization?

Problem approach

NORMALIZATION :
1) Normalization is a process of reducing redundancy by organizing the data into multiple tables.
2) Normalization leads to better usage of disk spaces and makes it easier to maintain the integrity of the database.


DENORMALIZATION :
1) Denormalization is the reverse process of normalization as it combines the tables which have been normalized into
a single...

View more

3. DBMS Question

Difference between Primary key and Unique key

Problem approach

Primary Key : Used to serve as a unique identifier for each row in a table.
Unique Key : Uniquely determines a row which isn’t primary key.

Key Differences Between Primary key and Unique key:

1) Primary key will not accept NULL values whereas Unique key can accept NULL values.
2) A table can have only one primary key whereas there can be multiple unique key on a table.
3)...

View more

4. DBMS Question

Explain Left Outer Join and Right Outer Join .

Problem approach

LEFT JOIN :
The LEFT JOIN or the LEFT OUTER JOIN returns all the records from the left table and also those records which
satisfy a condition from the right table. Also, for the records having no matching values in the right table, the output or
the result-set will contain the NULL values.

Syntax:

SELECT Table1.Column1,Table1.Column2,Table2.Column1,....
FROM Table1
...

View more

5. Puzzle

Measure 4L using 3L and 5L cans .

Problem approach

Steps :
Let's call 5L jar as X and 3L jar as Y.
1) We'll take the first jar, i.e, X. Fill X completely.
2) Then empty the X content in Y. We are left with 2 L in the X.
3) Now we will empty the Y jar and then Fill 2L from X into Y. We are left with 0L in X and 2L in Y.
4) Now again we will fill X with 5L and then empty till Y gets full.
5) As Y is already full with 2L from pre...

View more

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Minimum number of operands are required to use relational operators?

Start a Discussion
Similar interview experiences
company logo
Associate Software Engineer
4 rounds | 4 problems
Interviewed by IBM
1257 views
0 comments
0 upvotes
company logo
System Engineer
3 rounds | 12 problems
Interviewed by IBM
1541 views
0 comments
0 upvotes
company logo
Associate Software Engineer
2 rounds | 4 problems
Interviewed by IBM
2234 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by IBM
93 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Associate Software Engineer
3 rounds | 10 problems
Interviewed by Amdocs
1608 views
0 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 4 problems
Interviewed by Amdocs
1098 views
0 comments
0 upvotes
company logo
Associate Software Engineer
3 rounds | 5 problems
Interviewed by Optum
1113 views
0 comments
0 upvotes