GATE 2026 CS1 Question 50 – Algorithms
Consider the following pseudocode for depth-first search (DFS) algorithm which takes a directed graph 𝐺(𝑉, 𝐸) as input, where 𝑑[𝑣] and 𝑓[𝑣]…
Read more →Consider the following pseudocode for depth-first search (DFS) algorithm which takes a directed graph 𝐺(𝑉, 𝐸) as input, where 𝑑[𝑣] and 𝑓[𝑣]…
Read more →Let 𝐿1 and 𝐿2 be two languages over a finite alphabet, such that 𝐿1 ∩𝐿2 and 𝐿2 are regular languages. Which of…
Read more →Consider the following context-free grammar 𝐺. 𝑆→𝑎𝑏𝑎𝐴𝐵𝐴𝑏𝑏𝑎 𝐴→𝑎𝑎𝐵𝐵𝐴𝑏 | 𝑏𝐵𝑎𝑏𝑎𝑎 𝐵→𝑎𝐵𝑏 | 𝑎𝑏 In the above grammar, 𝑆 is the start symbol,…
Read more →Consider the following two syntax-directed definitions SDD1 and SDD2 for type declarations. 𝐷 is the start symbol, and 𝑖𝑛𝑡, 𝑓𝑙𝑜𝑎𝑡 and 𝑖𝑑…
Read more →Consider a system that has a cache memory unit and a memory management unit (MMU). The address input to the cache memory…
Read more →Consider the 8-bit signed integers 𝑋, 𝑌 and 𝑍 represented using the sign-magnitude form. The binary representations of 𝑋 and 𝑌 are…
Read more →Let 𝑛 be an odd number greater than 100. Consider a binary minheap with 𝑛 elements stored in an array 𝑃 whose…
Read more →Consider a hash table 𝑃[0, 1, … , 10] that is initially empty. The hash table is maintained using open addressing with…
Read more →Consider the following grammar where 𝑆 is the start symbol, and 𝑎 and 𝑏 are terminal symbols. 𝑆 →𝑎𝑆𝑏𝑆 ∣ 𝑏𝑆 ∣…
Read more →Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the fork() system call is always…
Read more →Ask a study question in English or Hindi. I will find relevant passages from our notes.