Member Technical Staff 2
Member Technical Staff 2 Interview Questions and Answers
Q1. What is page fault and segmentation?
A page fault occurs when a requested page is not found in the main memory. Segmentation is a memory management technique.
Page fault: Occurs when a requested page is not present in the main memory
Segmentation: Memory management technique that divides the memory into segments
Examples: Page fault occurs when accessing data from virtual memory, while segmentation allows different segments for code, data, and stack
Q2. Implement a min heap using priority queue.
A min heap can be implemented using a priority queue, where the smallest element has the highest priority.
Use a priority queue data structure to implement the min heap.
Ensure that the smallest element has the highest priority.
Implement the necessary operations like insert, delete, and extract min.
Maintain the heap property by percolating up or down as needed.
Q3. Implementation of Towers of Hanoi problem.
The Towers of Hanoi problem involves moving a stack of disks from one peg to another, following specific rules.
The problem consists of three pegs and a number of disks of different sizes.
The disks are initially stacked in decreasing order of size on one peg.
The goal is to move the entire stack to another peg, following these rules:
1. Only one disk can be moved at a time.
2. Each move consists of taking the top disk from one of the stacks and placing it on top of another stack....read more
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month