## TCS Interview Experience | Set 25 (On-Campus)

I got through four rounds of TCS campus placement. Round 1:Aptitude test This round was mainly of Quantitative Aptitude having topics like probability ,numbers, average… Read More »

## Print pair with maximum AND value in an array

Given an array of n positive elements, find the maximum AND value and the pair of elements generating the maximum AND value from the array.… Read More »

## Probability of choosing a random pair with maximum sum in an array

Given an array of N integers, You have to find the probability of choosing a random pair(i, j), i < j such that A[i] +… Read More »

## Royal Dutch Shell Interview Experience

Round 1: First round was an online test conducted by CoCubes. It was an adaptive test. It has three sections which included Quants, logical reasoning… Read More »

## AKS Primality Test

There are several primality test available to check whether the number is prime or not like Fermat’s Theorem, Miller-Rabin Primality test and alot more. But… Read More »

## GATE | GATE CS Mock 2018 | Question 28

Consider the Karnaugh map given below What is sum of products of given K-map? (A) C + A’BD + B’D’ (B) C + AB’D’ +… Read More »

## GATE | GATE CS Mock 2018 | Question 27

Consider following two C – program : P1 : filter_none edit close play_arrow link brightness_4 code int main() {     int (*ptr)(int ) = fun;     (*ptr)(3);… Read More »

## GATE | GATE CS Mock 2018 | Question 26

Consider the following assembly codes : (P1) : BYTE_VALUE DB 150 // A byte value is defined WORD_VALUE DW 300 // A word value is… Read More »

## Motzkin number

In mathematics, a Motzkin number for a given number n is the number of different ways of drawing non-intersecting chords between n points on a… Read More »

## GATE | GATE CS Mock 2018 | Question 25

What is the time complexity of following function fun()? Assume that log(x) returns log value in base 2. void fun() { int i, j; for… Read More »

## GATE | GATE CS Mock 2018 | Question 24

Consider 4-way set-associative cache memory has the following properties: Data words are 32 bits each A cache block will contain 2048 bits of data The… Read More »

## Sum of the series 0.6, 0.06, 0.006, 0.0006, …to n terms

Given the number of terms i.e. n. Find the sum of the series 0.6, 0.06, 0.006, 0.0006, …to n terms. Examples: Input : 2 Output… Read More »

## GATE | GATE CS Mock 2018 | Question 23

Consider the following grammars (S1) : A –> aBCD B –> bc|c C –> d|∈ D -> b (S2) : A –> aBCD B –>… Read More »

## wcstof function in C library

The wcstof() functions convert the initial portion of the wide-character string pointed to by str to a float point value. The str parameter points to… Read More »

## Smallest perfect power of 2 greater than n (without using arithmetic operators)

Given a non-negative integer n. The problem is to find the smallest perfect power of 2 which is greater than n without using the arithmetic… Read More »