IBM interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

IBM
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
I came to know about this job from there official site i have applied to this job and get selected for exam, then i have given the exam and also got selected for the interview
Application story
I applied for this profile on the company website where i got the test link after applying for the jobs
Why selected/rejected for the role?
I was not able to answer the optimal approach for a problem that's why i think i was rejected in the interview
Preparation
Duration: 4 Months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Graph should be on your tips.
Tip 2 : while explaining the solution to interviewer, dont just hop onto the most optimal solution. Start with the brute force one, give the cons of brute force solution, and then go step by step till you reach the optimal solution.
Tip 3 : Improve on your communication skills as well.

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

Tip 1 : Mention only what is required for your profile, for e.g. do not stress too much on your co curricular stuff. Rather, try explaining more of your technical stuff that is relevant for your job.
Tip 2 : keep it limited to 1 page. And make sure its a pdf and not an image.

Interview rounds

01
Round
Easy
Video Call
Duration60 Minutes
Interview date18 Nov 2022
Coding problem2

1. Partial BST

Moderate
25m average time
70% success
0/80
Asked in companies
FacebookAmazonMicrosoft

Given a binary tree with N number of nodes, check if that input tree is Partial BST (Binary Search Tree) or not. If yes, return true, return false otherwise.

A binary search tree (BST) is said to be a Partial BST if it follows the following properties.

• The left subtree of a node contains only nodes with data less than and equal to the node’s data.
• The right subtree of a node contains only nodes with data greater than and equal to the node’s data.
• Both the left and right subtrees must also be partial binary search trees.
Example:

Input:

BST1

Answer:

Level 1: 

All the nodes in the left subtree of 4 (2, 1, 3) are smaller 
than 4, all the nodes in the right subtree of the 4 (5) are 
larger than 4.

Level 2 :

For node 2:
All the nodes in the left subtree of 2 (1) are smaller than 
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtree for node 5 is empty.

Level 3:

For node 1:
The left and right subtree for node 1 are empty.
For node 3:
The left and right subtree for node 3 are empty.
Because all the nodes follow the property of a Partial binary 
search tree, the above tree is a Partial binary search tree.
Problem approach

Given a binary tree with N number of nodes, check if that input tree is Partial BST (Binary Search Tree) or not. If yes, return true, return false otherwise.

Try solving now

2. 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

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’.

Try solving now
02
Round
Easy
Video Call
Duration60 Minutes
Interview date18 Nov 2022
Coding problem2

1. Aptitude Question

Two trains, separated by a distance of 80km, are running towards each other on the same track at a speed of 40 kmph. A bird takes its flight from train X and flies towards train Y at a constant speed of 100 kmph. Once it reaches train Y, it turns and start flying back toward strain X. The bird keeps flying to and forth till both the trains collide. Determine the distance travelled by the bird.

Problem approach

Velocity of approach for two trains = (40+40)km/hr

Time taken for the trains to collide = 80km/80km/hr = 1hour

The total distance travelled by the bird = 100km/hr * 1hr = 100km

Through this puzzle, the interviewer is testing your approach. Consider yourself rejected if the approach you took involves calculating distance from X to Y, and then Y to X, and so on.


Note: Basically it's better if you have seen some puzzles before any HR round since they will give you an idea of what kind of problem you may encounter and then you can ace any difficult to difficult HR interview.

2. Distinct Islands

Moderate
25m average time
80% success
0/80
Asked in companies
SalesforceExpedia GroupMicrosoft

You are given a two-dimensional array/list of integers consisting of 0s and 1s. In the list, 1 represents land and 0 represents water.

The task is to find the number of distinct islands where a group of connected 1s(horizontally or vertically) forms an island.

Note:
Two islands are considered to be the same if and only if one island is equal to another(not rotated or reflected) i.e if we can translate one island on another without rotating or reflecting then it would be considered as the same islands. 
For example:
1 1 0
0 0 1
0 0 1

In this example, we have two islands and they would be considered as distinct islands as we can not translate them on one another even if they have the same no of 1's.
For example :
1 1 0 0 0 
1 1 0 0 0
0 0 0 1 1
0 0 0 1 1

In this example, we have two islands and they are the same as we can translate one island onto another island, so our answer should be 1.
Problem approach

You are given a two-dimensional array/list of integers consisting of 0s and 1s. In the list, 1 represents land and 0 represents water.
The task is to find the number of distinct islands where a group of connected 1s(horizontally or vertically) forms an island.

Try solving now
03
Round
Easy
HR Round
Duration30 Minutes
Interview date18 Nov 2022
Coding problem1

1. Basic HR Questions

Tell me about yourself.?
What are your greatest strengths and weaknesses?
Why do you want to work for our company?

Problem approach

Do not fake! Be yourself. Bluffing during the HR interview should be avoided at all costs.
Answer to the point and while answering, be honest and truthful.
Wear comfortable but formal clothes. Keep accessories to a bare minimum.

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
company logo
SDE - 1
2 rounds | 2 problems
Interviewed by IBM
4299 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by IBM
1784 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by IBM
2296 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by IBM
886 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