All Easy Articles

## Doubly Linked List | Set 1 (Introduction and Insertion) 2

We strongly recommend to refer following post as a prerequisite of this post. Linked List Introduction Inserting a node in Singly Linked List A Doubly… Read More »

## Tail Recursion 2.4

What is tail recursion? A recursive function is tail recursive when recursive call is the last thing executed by the function. For example the following… Read More »

## Data Structures | Linked List | Question 17 2

Consider the following function to traverse a linked list. filter_none edit close play_arrow link brightness_4 code void traverse(struct Node *head) {    while (head->next != NULL)… Read More »

## GATE | GATE-CS-2006 | Question 85 2

Consider three CPU-intensive processes, which require 10, 20 and 30 time units and arrive at times 0, 2 and 6, respectively. How many context switches… Read More »

## GATE | GATE-CS-2006 | Question 5 2

For which one of the following reasons does Internet Protocol (IP) use the timeto- live (TTL) field in the IP datagram header (A) Ensure packets… Read More »

## Check if a given Binary Tree is height balanced like a Red-Black Tree 2.9

In a Red-Black Tree, the maximum height of a node is at most twice the minimum height (The four Red-Black tree properties make sure this… Read More »

## GATE | GATE-CS-2007 | Question 68 2

The message 11001001 is to be transmitted using the CRC polynomial x^3 + 1 to protect it from errors. The message that should be transmitted… Read More »

## GATE | GATE-CS-2007 | Question 85 2

The address of a class B host is to be split into subnets with a 6-bit subnet number. What is the maximum number of subnets… Read More »

## Print a long int in C using putchar() only 2

Write a C function print(n) that takes a long int number n as argument, and prints it on console. The only allowed library function is… Read More »

## GATE | GATE-CS-2007 | Question 43 2.3

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 »

## GATE | GATE-CS-2007 | Question 85 2

Define the connective * for the Boolean variables X and Y as: X * Y = XY + X’ Y’. Let Z = X *… Read More »

## GATE | GATE-CS-2007 | Question 26 2.5

(A) A (B) B (C) C (D) D Answer: (C) Explanation: A partition is said to refine another partition if it splits the sets in… Read More »

## GATE | GATE-CS-2007 | Question 85 2

Let Graph(x) be a predicate which denotes that x is a graph. Let Connected(x) be a predicate which denotes that x is connected. Which of… Read More »

## GATE | GATE-CS-2007 | Question 20 2

Which one of the following uses UDP as the transport protocol? (A) HTTP (B) Telnet (C) DNS (D) SMTP Answer: (C) Explanation: UDP is a… Read More »

## GATE | GATE-CS-2007 | Question 85 2

In Ethernet when Manchester encoding is used, the bit rate is: (A) Half the baud rate. (B) Twice the baud rate. (C) Same as the… Read More »

## Bitwise Operators in C/C++ 2.6

In C, the following 6 operators are bitwise operators (work at bit-level) The & (bitwise AND) in C or C++ takes two numbers as operands… Read More »

## GATE | GATE CS 2008 | Question 85 2.6

Consider the following ER diagram. The minimum number of tables needed to represent M, N, P, R1, R2 is (A) 2 (B) 3 (C) 4… Read More »

## Print all nodes that don’t have sibling 2.1

Given a Binary Tree, print all nodes that don’t have a sibling (a sibling is a node that has same parent. In a Binary Tree,… Read More »

## GATE | GATE CS 2008 | Question 52 2

Match the following NFAs with the regular expressions they correspond to 1. ϵ + 0(01*1 + 00) * 01* 2. ϵ + 0(10 *1 +… Read More »

## Find if two rectangles overlap 2.2

Given two rectangles, find if the given two rectangles overlap or not. Note that a rectangle can be represented by two coordinates, top left and… Read More »