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

Senior Software Engineer

Western Digital
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
For DSA preparation, I solved around 300 problems from platforms like GFG, Leetcode, CodeStudio, etc., and participated in some Leetcode biweekly and weekly contests. Apart from DSA, I prepared for Aptitude and core Computer Science subjects like Operating Systems, Database Management Systems, Computer Networks, and Object Oriented Programming.
Application story
I applied on campus for the role. There was an initial shortlisting through an Online Assessment. For interviews, there were two rounds, 2 Technical. All interview rounds were conducted on the same day, and the results were announced on the same day
Why selected/rejected for the role?
Rejected. The primary reason being not practicing enough Hard problems on Linked Lists. Western Digital focused a lot on Linked List topic and asked hard questions during interview. They wanted the most optimal solution of all questions and not only solving the problem.
Preparation
Duration: 2.5 months
Topics: Data Structures, Algorithms, OOPS, Computer Networks, Database Management Systems, Operating Systems, Aptitude
Tip
Tip

Tip 1 : Don't leave any DSA topic; you may get questions from any topic
Tip 2 : Focus on fundamentals of core CS subjects like OS, CN, DBMS, OOP, as they are very important
Tip 3 : You must be aware of every detail about the projects you have mentioned in your resume

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

Tip 1: Do not put false things on your resume
Tip 2: You must be aware of every detail about the projects you have mentioned in your resume

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date15 Jul 2022
Coding problem3

There were total 60 mcq questions

1. Technical questions

1) Consider a virtual memory system with FIFO page replacement policy. For an arbitrary page access pattern, increasing the number of page frames in main memory will

a) Always decrease the number of page faults
b) Always increase the number of page faults
c) Some times increase the number of page faults
d) Never affect the number of page faults

2) In which one of the following page replacement policies, Belady’s anomaly may occur?

(A) FIFO
(B) Optimal
(C) LRU
(D) MRU

2. Technical questions

Out of all the 2-digit integers between 1 and 100, a 2-digit number has to be selected at random. What is the probability that the selected number is not divisible by 7?

a) 13/90
b) 12/90
c) 78/90
d) 79/90

3. Output questions

1) Predict output of following:

#include 
using namespace std;

int main()
{
int a = b = c = 0;
cout << a << "*" << b << "*" << c;
return 0;
}

2) Predict output of following:

#include 
using namespace std;

class A
{
int id;
public:
A (int i) { id = i; }
void print () { cout << id << endl; }
};

int main()
{
A a[2];
a[0].print();
a[1].print();
return 0;
}

02
Round
Medium
Video Call
Duration30 mins
Interview date17 Jul 2022
Coding problem2

1) Explain SSD and HDD and difference between them
2) Different types of storage devices and their functioning
3) How is data stored in Data Centres, explain in detail
4) Explain recursion, DP, Optimisation

1. N-th Fibonacci Number

Moderate
40m average time
70% success
0/80
Asked in companies
MathworksAmazonOracle

You are given an integer ‘N’, your task is to find and return the N’th Fibonacci number using matrix exponentiation.

Since the answer can be very large, return the answer modulo 10^9 +7.

Fibonacci number is calculated using the following formula:
F(n) = F(n-1) + F(n-2), 
Where, F(1) = F(2) = 1.
For Example:
For ‘N’ = 5, the output will be 5.
Problem approach

Interviewer wanted me to start from recusion then use DP to solve the problem
1) Use Recursion
2) Use DP 
3) Space Optimise the above solution

Try solving now

2. Bit Set

Easy
15m average time
85% success
0/40
Asked in companies
LenskartGreyOrangeBusibud solutions pvt ltd

You are given a sequence of only digits in the form of a string 'DIGIT_PATTERN', your task is to find the first repeating digit. If no digit is repeating you should return -1.

Example:

Given string of digits is 123456325. Now starting from the left, the first digit which is repeating is 3 as till 2nd 3 every digit is encountered 1st time and thus our answer for this input will be 3.
Try solving now
03
Round
Medium
Video Call
Duration30 mins
Interview date17 Jul 2022
Coding problem2

1) 2 coding problems on Linked Lists
2) Difference between Semaphore and Spin Lock
3) Deadlocks

1. Copy List with Random Pointer

Easy
10m average time
90% success
0/40
Asked in companies
Urban Company (UrbanClap)AmazonMeesho

Given a linked list having two pointers in each node. The first one points to the next node of the list, however, the other pointer is random and can point to any node of the list or null. The task is to create a deep copy of the given linked list and return its head. We will validate whether the linked list is a copy of the original linked list or not.

A deep copy of a Linked List means we do not copy the references of the nodes of the original Linked List rather for each node in the original Linked List, a new node is created.

For example,

example

Random pointers are shown in red and next pointers in black.

Problem approach

1) Brute Force approach of using a map to store the nodes and the next/prev pointers

Try solving now

2. Rotate Linked List

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

You are given a linked list having ‘n’ nodes and an integer ‘k’.


You have to rotate the linked list to the right by ‘k’ positions .


Example :
Input: linked list = [1 2 3 4] , k = 2

Output: 3 4 1 2

Explanation:
We have to rotate the given linked list to the right 2 times. After rotating it to the right once it becomes 4->1->2->3. After rotating it to the right again, it becomes 3->4->1->2. 


Problem approach

1) Brute Force

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

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
SDE - 1
4 rounds | 6 problems
Interviewed by Western Digital
758 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6450 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Senior Software Engineer
1 rounds | 3 problems
Interviewed by Intuit
2963 views
1 comments
0 upvotes
company logo
Senior Software Engineer
5 rounds | 5 problems
Interviewed by PhonePe
2560 views
0 comments
0 upvotes
company logo
Senior Software Engineer
4 rounds | 4 problems
Interviewed by Walmart
7469 views
1 comments
0 upvotes