Western Digital
20+ SLN Technologies Interview Questions and Answers
Q1. In DSA part, 1. Code for merge sort 2. Check if two trees are mirror 3. Find element in rotated sorted array 4. Check if linked list is palindrome 5. Detect a loop in linked list 6. Remove loop in linked list
List of DSA questions including merge sort, tree mirror check, rotated sorted array search, linked list palindrome and loop detection and removal.
Merge sort is a divide and conquer algorithm that sorts an array in O(nlogn) time complexity.
To check if two trees are mirror, we need to compare their left and right subtrees recursively.
To find an element in a rotated sorted array, we can use binary search algorithm.
To check if a linked list is palindrome, we can use stack or recu...read more
Q2. What is structure padding and why it happens?
Structure padding is the insertion of unused bytes between members of a structure to align the data in memory.
Padding is added to ensure that each member of the structure is aligned to a memory address that is a multiple of its size.
Padding can be compiler-dependent and can vary based on the target architecture.
Padding can affect the size of the structure and the performance of the program.
Example: struct MyStruct { char a; int b; char c; }; - padding will be added between a ...read more
Q3. map vs unordered_map, vector vs list
map and unordered_map are associative containers while vector and list are sequence containers.
map and unordered_map are used to store key-value pairs while vector and list are used to store sequences of elements.
map and unordered_map provide faster search and insertion of elements while vector and list provide faster insertion and deletion of elements.
map and unordered_map use red-black trees and hash tables respectively while vector and list use arrays and linked lists resp...read more
Q4. Code for fibonacci series
Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones.
Declare variables for first, second and next numbers
Initialize first and second numbers as 0 and 1 respectively
Loop through the desired number of terms and calculate the next number as the sum of the previous two
Store the result in an array
Return the array
Q5. What do you know about HDD?
HDD stands for Hard Disk Drive, a data storage device used in computers to store and retrieve digital information.
HDDs use magnetic storage to store data on spinning disks called platters.
They have read/write heads that move across the platters to access and modify data.
HDDs are typically used for long-term storage of large amounts of data in desktops, laptops, servers, and other devices.
Examples of HDD manufacturers include Seagate, Western Digital, and Toshiba.
Q6. Synchronisation of given thread blocks
Synchronizing thread blocks is important for efficient and correct execution of parallel programs.
Thread blocks must be synchronized to avoid race conditions and ensure correct program output.
Synchronization can be achieved using locks, semaphores, or barriers.
Examples of synchronization include ensuring that shared resources are accessed by only one thread at a time, or that threads wait for each other before proceeding.
Synchronization can also be used to optimize program pe...read more
Q7. Explain dynamic polymorphism
Dynamic polymorphism is the ability of an object to take on multiple forms during runtime.
It allows objects of different classes to be treated as if they are of the same class.
It is achieved through virtual functions and inheritance.
Examples include function overriding and templates in C++.
Q8. Types of casts in C++
C++ has four types of casts: static_cast, dynamic_cast, const_cast, and reinterpret_cast.
static_cast is used for implicit conversions between related types
dynamic_cast is used for runtime type checking and casting of polymorphic types
const_cast is used to remove const or volatile qualifiers from a variable
reinterpret_cast is used for low-level casting between unrelated types
Examples: static_cast
(3.14), dynamic_cast (basePtr), const_cast (str), reinterpret_cast (&ptr)
Q9. Functors in C++, uses
Functors are objects that can be treated as functions in C++. They are used for generic programming and can be passed as arguments.
Functors are often used in algorithms that require a function object as a parameter.
They can be used to implement callbacks and event handlers.
Functors can be used to create custom comparators for sorting algorithms.
They can also be used to implement function objects for mathematical operations.
Examples of functors in C++ include std::function, st...read more
Q10. IPC mechanisms in Linux
IPC mechanisms in Linux are used for inter-process communication between processes running on the same system.
IPC mechanisms include pipes, message queues, shared memory, and semaphores.
Pipes are used for one-way communication between two processes.
Message queues allow for asynchronous communication between processes.
Shared memory allows multiple processes to access the same memory space.
Semaphores are used for synchronization between processes.
IPC mechanisms can be accessed ...read more
Q11. What you learn in your misprocess and what happens in product?
Learning from misprocess improves product quality.
Misprocess helps identify flaws in the production process.
Analyzing misprocess helps in finding solutions to improve product quality.
Learning from misprocess helps in preventing future errors and improving efficiency.
For example, if a batch of products is found to be defective, analyzing the misprocess can help identify the root cause and prevent it from happening again.
Q12. Do you know how to lower the internet speed using dev tools in a browser?
Yes, it can be done using network throttling feature in dev tools.
Open dev tools in browser
Go to Network tab
Select the desired network speed from the dropdown menu
Reload the page to see the changes
Example: In Chrome, go to Dev Tools > Network > Throttling dropdown menu
Example: Select 'Slow 3G' to lower the internet speed
Q13. What is your knowledge in process you handle?
I have extensive knowledge in the process I handle.
I have been handling this process for several years now.
I have undergone training and certification in this process.
I keep myself updated with the latest developments and best practices in this process.
I have successfully implemented improvements in this process that resulted in cost savings and increased efficiency.
I have also trained and mentored new employees in this process.
Q14. How will you validate a linked list
To validate a linked list, check if it is properly connected, has no cycles, and all elements are accessible.
Check if the head node is not null
Traverse the linked list and check if each node's next pointer is valid
Check for any cycles in the linked list using Floyd's cycle-finding algorithm
Ensure that all elements in the linked list are accessible
Q15. 2) 4 pillars of oops concept.
4 pillars of OOPs: Abstraction, Encapsulation, Inheritance, Polymorphism.
Abstraction: Hiding implementation details and showing only necessary information.
Encapsulation: Binding data and functions together and restricting access to them.
Inheritance: Creating new classes from existing ones, inheriting properties and methods.
Polymorphism: Ability of objects to take on multiple forms or behaviors.
Q16. Have you encounter misprocess?
Yes, I have encountered misprocess in my previous job.
Misprocess can occur due to human error or system malfunction.
It can lead to delays, errors, and loss of productivity.
In my previous job, we had a misprocess where a shipment was sent to the wrong address due to a clerical error.
We had to rectify the mistake by sending another shipment to the correct address and apologizing to the customer.
To prevent misprocess, we implemented double-checking procedures and automated syste...read more
Q17. what are different product of WD?
WD offers a variety of products including external hard drives, internal hard drives, SSDs, and network attached storage devices.
External hard drives
Internal hard drives
SSDs
Network attached storage devices
Q18. What is Regression Testing
Regression testing is the process of retesting a software application to ensure that new code changes have not adversely affected existing functionality.
Regression testing is performed after code changes to verify that the existing functionality still works correctly.
It helps in identifying any defects introduced due to code changes.
Regression testing can be automated to save time and effort.
Examples of regression testing tools include Selenium, JUnit, and TestNG.
Q19. What is Agile Methodology
Agile Methodology is a software development approach that emphasizes flexibility, collaboration, and iterative development.
Iterative approach to software development
Emphasizes flexibility and adaptability to change
Encourages collaboration between cross-functional teams
Delivers working software in short, frequent iterations
Involves continuous feedback and improvement
Q20. 3) implement queue using stack
Implement a queue using stack
Use two stacks, one for enqueue and one for dequeue
When dequeue is called, pop all elements from enqueue stack and push to dequeue stack
Then pop from dequeue stack to get the first element added to the queue
When enqueue is called, simply push the element to enqueue stack
Q21. Scheduling rules in APO GATP
Scheduling rules in APO GATP determine the sequence in which orders are processed and fulfilled.
Scheduling rules prioritize orders based on criteria such as delivery date, customer priority, and product availability
Examples of scheduling rules include FIFO (First In, First Out), LIFO (Last In, First Out), and priority-based sequencing
Scheduling rules can be customized to meet specific business requirements and optimize order fulfillment
Q22. Use cases for Google Drive?
Google Drive can be used for storing, sharing, and collaborating on various types of files.
Storing personal and work documents
Sharing files with colleagues, friends, and family
Collaborating on projects with team members
Creating and sharing presentations, spreadsheets, and documents
Backing up important files and photos
Accessing files from any device with internet connection
Q23. Define Maven Cycle
Maven cycle is the process of building, testing, packaging, and deploying a software project using Maven build tool.
Maven cycle includes phases like compile, test, package, install, and deploy.
It starts with compiling the source code, running tests, packaging the application, installing it in the local repository, and deploying it to a remote repository.
Maven uses a project object model (POM) file to define the project structure and dependencies.
Maven plugins are used to exec...read more
Q24. Define Retesting
Retesting is the process of running tests on previously failed test cases after the defects have been fixed.
Retesting is done to ensure that the reported defects have been successfully fixed.
It focuses on the areas where defects were found during initial testing.
Retesting is usually performed by the same tester who reported the defects.
Examples: After a bug is fixed, the tester retests the specific test case that originally failed to confirm the fix.
Q25. Implement random()
Implement random() function.
Use a pseudorandom number generator algorithm to generate random numbers.
Seed the generator with a unique value to ensure different sequences of random numbers.
Consider the range of numbers required and scale the generated numbers accordingly.
Ensure the generated numbers have a uniform distribution.
Test the implementation for randomness and statistical properties.
Q26. Detect loop in linked list
Use Floyd's Tortoise and Hare algorithm to detect loop in linked list.
Initialize two pointers, slow and fast, at the head of the linked list.
Move slow pointer by one step and fast pointer by two steps.
If they meet at any point, there is a loop in the linked list.
More about working at Western Digital
Top HR Questions asked in SLN Technologies
Interview Process at SLN Technologies
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month