Skip to content
Gblog Get FREE Placement Assistance with GeeksforGeeks LIVE Courses to Upskill Yourself
The job market has changed drastically post-pandemic – with frequent job-hopping and the race to upskill oneself. The latter has proved to be a game-changer… Read More
Consider the following C program segment where CellNode represents a node in a binary tree: struct CellNode  {   struct CellNOde *leftChild;   int element;   struct CellNode… Read More
What is the time complexity of the following recursive function: int DoSomething (int n)  {   if (n <= 2)     return 1;   else       return (DoSomething (floor(sqrt(n)))… Read More
In the following C function, let n >= m. int gcd(n,m) {   if (n%m ==0) return m;     n = n%m;   return gcd(m,n); } How many… Read More
A complete n-ary tree is a tree in which each node has n children or no children. Let I be the number of internal nodes… Read More
Consider the following C function, what is the output? #include <stdio.h> int f(int n) {     static int r = 0;     if (n <= 0) return… Read More
In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most efficiently, in terms of time… Read More
Consider a hash table of size seven, with starting index zero, and a hash function (3x + 4)mod7. Assuming the hash table is initially empty,… Read More
The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g,… Read More
The following postfix expression with single digit operands is evaluated using a stack: 8 2 3 ^ / 2 3 * + 5 1 *… Read More
Consider a pipelined processor with the following four stages: IF: Instruction Fetch ID: Instruction Decode and Operand Fetch EX: Execute WB: Write Back The IF,… Read More
The control signal functions of a 4-bit binary counter are given below (where X is “don’t care”) The counter is connected as follows: The counter… Read More
In a look-ahead carry generator, the carry generate function Gi and the carry propagate function Pi for inputs Ai and Bi are given by: Pi… Read More
Suppose only one multiplexer and one inverter are allowed to be used to implement any Boolean function of n variables. What is the minimum size… Read More
Define the connective * for the Boolean variables X and Y as: X * Y = XY + X’ Y’. Let Z = X *… Read More
Let f(w, x, y, z) = ∑(0, 4, 5, 7, 8, 9, 13, 15). Which of the following expressions are NOT equivalent to f? (A)… Read More

Start Your Coding Journey Now!