Skip to content
Gblog GeeksforGeeks True Geek Tournament – 7 Days Marathon to Earn the ‘True Geek’ Title!
Do you remember the childhood days, when cricket was the major reason for living to you and how excited you used to be for that… Read More
Consider the following C program:    #include             #define EOF -1            void push (int); /* push the argument on the stack */            int pop  (void); /* pop… Read More
Consider the C program given below : #include <stdio.h> int main ()    {     int sum = 0, maxsum = 0,  i,  n = 6;     int… Read More
Suppose you are given an implementation of a queue of integers. The operations that can be performed on the queue are: i. isEmpty (Q) —… Read More
When searching for the key value 60 in a binary search tree, nodes containing the key values 10, 20, 40, 50, 70 80, 90 are… Read More
Consider a hash function that distributes keys uniformly. The hash table size is 20. After hashing of how many keys will the probability that any… Read More
The function f is defined as follows: int f (int n) {     if (n <= 1) return 1;     else if (n % 2  ==  0)… Read More
Consider n jobs J1, J2,……Jn such that job Ji has execution time ti and a non-negative integer weight wi. The weighted mean completion time of… Read More
What is the largest integer m such that every simple connected graph with n vertices and n edges contains at least m different spanning trees?… Read More
A depth-first search is performed on a directed acyclic graph. Let d[u] denote the time at which vertex u is visited for the first time… Read More
A partial order P is defined on the set of natural numbers as follows. Here x/y denotes integer division. i. (0, 0) ∊ P. ii.… Read More
The trapezoidal method is used to evaluate the numerical value of . Consider the following values for the step size h. i. 10-2 ii. 10-3… Read More
Which one of these first-order logic formula is valid? (A) ∀x(P(x) => Q(x)) => (∀xP(x) => ∀xQ(x)) (B) ∃x(P(x) ∨ Q(x)) => (∃xP(x) => ∃xQ(x))… Read More
Comprehension passages are sure shot scoring questions. We are given a passage and some questions that follow the passage. The questions are to be answered… Read More
In C/C++ and Java, we can write empty function as following // An empty function in C/C++/Java void fun() { } In Python, if we… Read More
Consider the XML document fragment given below: Consider the XPath expression: *[not (self ) : : TOC] What would be the result of the given… Read More