All Medium Articles

## Magic Square 3.6

A magic square of order n is an arrangement of n^2 numbers, usually distinct integers, in a square, such that the n numbers in all… Read More »

## Maximum Product Subarray 3.5

Given an array that contains both positive and negative integers, find the product of the maximum product subarray. Expected Time complexity is O(n) and only… Read More »

## Copy elision in C++ 3.6

Copy elision (or Copy omission) is a compiler optimization technique that avoids unnecessary copying of objects. Now a days, almost every compiler uses it. Let… Read More »

## To find sum of two numbers without using any operator 3.6

Write a program to find sum of positive integers without using any operator. Only use of printf() is allowed. No other library function can be… Read More »

## Sequence Points in C | Set 1 3.4

In this post, we will try to cover many ambiguous questions like following. Guess the output of following programs. filter_none edit close play_arrow link brightness_4… Read More »

## Sudoku | Backtracking-7 3.8

Given a partially filled 9×9 2D array ‘grid[9][9]’, the goal is to assign digits (from 1 to 9) to the empty cells so that every… Read More »

## Importance of function prototype in C 3

Function prototype tells compiler about number of parameters function takes, data-types of parameters and return type of function. By using this information, compiler cross checks… Read More »

## Database Management Systems | Set 11 3

Following questions have been asked in GATE CS 2007 exam. 1) Information about a collection of students is given by the relation studinfo(studId, name, sex).… Read More »

## Partition problem | DP-18 3.5

Partition problem is to determine whether a given set can be partitioned into two subsets such that the sum of elements in both subsets is… Read More »

## Automata Theory | Set 5 3

Following questions have been asked in GATE CS 2009 exam. 1) S –> aSa| bSb| a| b ;The language generated by the above grammar over… Read More »

## Computer Networks | Set 11 3

Following questions have been asked in GATE CS 2006 exam. 1) Station A uses 32 byte packets to transmit messages to Station B using a… Read More »

## Computer Networks | Set 10 3

Following questions have been asked in GATE CS 2007 exam. 1) The address of a class B host is to be split into subnets with… Read More »

## Computer Networks | Set 8 3.2

Following questions have been asked in GATE CS 2008 exam. 1) What is the maximum size of data that the application layer can pass on… Read More »

## Computer Networks | Set 7 3

Following questions have been asked in GATE CS 2008 exam. 1) Which of the following system calls results in the sending of SYN packets? (A)… Read More »

## Computer Networks | Set 6 3.7

Following questions have been asked in GATE CS 2005 exam. 1) An organization has a class B network and wishes to form subnets for 64… Read More »

## Computer Networks | Set 4 3.3

Following Questions have been asked in GATE 2010 CS exam. 1) One of the header fields in an IP datagram is the Time to Live… Read More »

## Computer Networks | Set 3 3

Following Questions have been asked in GATE 2011 CS exam. 1) A layer-4 firewall ( a device that can look at all protocol headers up… Read More »

## Database Management Systems | Set 7 3.5

Following questions have been asked in GATE 2008 CS exam. 1) Let R and S be two relations with the following schema R (P,Q,R1,R2,R3) S… Read More »

## Operating Systems | Set 16 3.7

Following questions have been asked in GATE CS 2005 exam. 1) Normally user programs are prevented from handling I/O directly by I/O instructions in them.… Read More »

## Computer Networks | Set 1 3.7

Following questions have been asked in GATE CS 2012 exam. 1) The protocol data unit(PDU) for the application layer in the Internet stack is (A)… Read More »