All Easy Articles

## Maximum Length Chain of Pairs | DP-20 2.6

You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. A pair (c, d) can… Read More »

## Output of C Program | Set 28 2.4

Predict the output of following C program. Question 1 filter_none edit close play_arrow link brightness_4 code #include <stdio.h>    int main() {     char a =… Read More »

## Rotate a Linked List 2.1

Given a singly linked list, rotate the linked list counter-clockwise by k nodes. Where k is a given positive integer. For example, if the given… Read More »

## Output of C++ Program | Set 11 2.4

Predict the output of following C++ programs. Question 1 filter_none edit close play_arrow link brightness_4 code #include<iostream> using namespace std;    class Point { private:… Read More »

## Find a triplet from three linked lists with sum equal to a given number 2.8

Given three linked lists, say a, b and c, find one node from each list such that the sum of the values of the nodes… Read More »

## Playing with Destructors in C++ 2.8

Predict the output of the below code snippet. filter_none edit close play_arrow link brightness_4 code #include <iostream> using namespace std;    int i;    class… Read More »

## Sieve of Eratosthenes 2.4

Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number. Example: Input… Read More »

## C++ Program for Sieve of Eratosthenes 2

Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number. For example,… Read More »

## Python Program for Sieve of Eratosthenes 2.5

Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number. For example,… Read More »

## Find a pair with the given difference 2.3

Given an unsorted array and a number n, find if there exists a pair of elements in the array whose difference is n. Examples: Input:… Read More »

## Check whether a given point lies inside a triangle or not 2.2

Given three corner points of a triangle, and one more point P. Write a function to check whether P lies within the triangle or not.… Read More »

## Output of C++ Program | Set 10 2.4

Predict the output of following C++ programs. Question 1 filter_none edit close play_arrow link brightness_4 code #include<iostream> #include<string.h> using namespace std;    class String {… Read More »

## Multiline macros in C 2.5

In this article, we will discuss how to write a multi-line macro. We can write multi-line macro same like function, but each statement ends with… Read More »

## Construct Special Binary Tree from given Inorder traversal 2.6

Given Inorder Traversal of a Special Binary Tree in which key of every node is greater than keys in left and right children, construct the… Read More »

## Automata Theory | Set 3 2

Following questions have been asked in GATE CS 2011 exam. 1) The lexical analysis for a modern language such as Java needs the power of… Read More »

## Automata Theory | Set 2 2.7

Following questions have been asked in GATE CS 2012 exam. 1) What is the complement of the language accepted by the NFA shown below? Assume… Read More »

## Computer Networks | Set 5 2.5

Following questions have been asked in GATE CS 2005 exam. 1) Packets of the same session may be routed through different paths in: (a) TCP,… Read More »

## Computer Networks | Set 2 2.4

Following Questions have been asked in GATE 2012 CS exam. 1) Consider a source computer (S) transmitting a file of size 106 bits to a… Read More »

## Database Management Systems | Set 2 2.8

Following Questions have been asked in GATE 2012 exam. 1) Which of the following statements are TRUE about an SQL query? P: An SQL query… Read More »

## Operating Systems | Set 14 2.5

Following questions have been asked in GATE CS 2006 exam. 1) Consider three CPU-intensive processes, which require 10, 20 and 30 time units and arrive… Read More »