Skip to content
Gblog Must Do Coding Questions for Product Based Companies
As the placement season is back, GeeksforGeeks is here to help you crack the interview. We have selected some most commonly asked and MUST DO… Read More
Consider the following proposed solution for the critical section problem. There are n processes: P0 …Pn−1. In the code, function pmax returns an integer not… Read More
Consider a computer system with ten physical page frames. The system is provided with an access sequence a1, a2, …, a20, a1, a2, …, a20),… Read More
Consider a disk queue with requests for I/O to blocks on cylinders 47, 38, 121, 191, 87, 11, 92, 10. The C-LOOK scheduling algorithm is… Read More
Consider a computer system with 40-bit virtual addressing and page size of sixteen kilobytes. If the computer system has a one-level page table per process… Read More
Consider the following Syntax Directed Translation Scheme (SDTS), with non-terminals {S, A} and terminals {a, b}}. Using the above SDTS, the output printed by a… Read More
The attributes of three arithmetic operators in some programming language are given below. Operator Precedence Associativity Arity + High Left Binary - Medium Right Binary… Read More
Let X be a recursive language and Y be a recursively enumerable but not recursive language. Let W and Z be two languages such that… Read More
Consider the transition diagram of a PDA given below with input alphabet ∑ = {a, b}and stack alphabet Γ = {X, Z}. Z is the initial… Read More
Consider the following context-free grammars: Which one of the following pairs of languages is generated by G1 and G2, respectively (A) A (B) B (C)… Read More
Let Q denote a queue containing sixteen numbers and S be an empty stack. Head(Q) returns the element at the head of the queue Q… Read More
G = (V, E) is an undirected simple graph in which each edge has a distinct weight, and e is a particular edge of G.… Read More
Let G be a complete undirected graph on 4 vertices, having 6 edges with weights being 1, 2, 3, 4, 5, and 6. The maximum… Read More
Consider the weighted undirected graph with 4 vertices, where the weight of edge {i, j} g is given by the entry Wij in the matrix… Read More
An operator delete(i) for a binary heap data structure is to be designed to delete the item in the i-th node. Assume that the heap… Read More
What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed? a=3; void n(x) {x =… Read More