-->

EveryBrickMatters

Find loop in a Linked List

Que : Write a program to check whether there is a loop in linked list . For example see in the following figure we have loop : Method 1...


Joins in Database

Explain all the Joins ? An SQL join clause combines records from two or more tables in a database. It creates a set that can be saved as ...


Aricent Group Interview Experience Set 1

Aptitude Test The aptitude test was conducted online and consisted of 4 parts 1. English 2. Mathematical Aptitude 3. Computers( pseudo...


MAQ Software Interview Experience Set 1.

Aptitude Test The first round was conducted on 15th November 2012,Ist round held on 14:00 and of 50 minutes.first round consists of 75 mu...


Measure 45 minutes using two candles

Que :  You are given a match-box and two candles of equal size, which can burn 1 hour each. You have to measure 45 minutes with these candl...


SQL Complex Queries Interview Question Set 1

Que : You are given a table named Employee with columns EmployeeId, Name , ManagerId in it. Write an SQL statement to find out all the mana...


One Rupee Mystery Puzzle

Que : Three friends rent a room for Rs.30 by paying Rs.10 each. The owner decides to give them a discount Rs.5 and gives it to the broker. ...


Heavy or Light Weight Ball Puzzle

Que : You have eight balls: seven are the same weight, and one is heavier or lighter than the rest. Given a scale that only tells you which...


Maximum 5 elements from 3 given Array

Write a program to find out the maximum 5 distinct elements from the 3 given array . For example if we are given three array as follows : ...


Sapient Nitro Interview Solution Set -1

Round 1 : Written Round (Technical + Aptitude) Round 2: (Technical Interview) Que: What is the difference between C and C++? C:- ...


3 Room Puzzle

There are three rooms, and there are Princess, Flowers and Snake in those rooms. The doors of all the rooms have incorrect nameplates. i.e....


Power of 2

Write a program to check whether the given number is a power of 2 or not . For example if the given number is 8 then it should print true e...


Swapping two number using third variable or without using third variable

Write a program two swap two number using third or without using third variable. For example if we have two  num1=5 and num2 =6 then after ...


Basic Linux Commands

Pwd: pwd command will print your home directory on screen, pwd means print working directory. /u0/ssb/ishant is output for the command ...


Explain Volatile Keyword in C

Volatile keyword is intended to prevent the compiler from applying certain optimizations which it might have otherwise applied because ordi...


Big Endian vs Little Endian

Big-endian and little-endian are terms that describe the order in which a sequence of bytes are stored in computer memory. Big-endian   ...


Move all zeroes to the end of array

Given an array , write a program to move all the zero to the end of array . For example if the given array is { 1, 0, 2, 1, 0, 3, 0, 0, 5 }...


Count number of leaf nodes in a binary tree

Write a program to count the number of leaf nodes in a binary tree . For example if we have the following tree then it must return 3(as it ...


String literal vs String Object in Java

How many objects will be created in the following cases : 1) String s1 = new String ("Everybrickmatters"); 2) String s2= ...


How to write Immutable object in Java ?

The main property of immutable object is that the state of the immutable object can not be modified once created . Hence to make an object ...


Four Tablet Puzzle

There are four tablets among which there are 2 pairs of two different type of tablet .But  you can't differentiate between four tablets...


Ebay Interview Solution Set -1

Round 1   Q1. Let us assume there are 3 baskets with different number of balls say p,q and r. Every ball has a number written on it...


Postfix Evaluation

Write a program for Postfix Evaluation using Stack ? For example if we have an expression  432*+5- then it should return 5. Algorithm : ...


View in database

What is View in database ? Why do we need to create View ? A view is virtual table which is created from one or many tables which depends ...


Mutex vs Semaphore

Difference between Mutex and Semaphore   Mutex: Is a key to a toilet. One person can have the key - occupy the toilet - at the time. When...


Kernel , Monolithic Kernel and Microkernel

What is kernel ? Explain the different types of kernel ? Kernel is the main component of the operating system.It is a bridge between appl...


Balancing of Brackets in Expression(Application of Stack)

Que : Write a program for checking balancing of brackets in expression. For example : If expression is [{()}] then it should return true. ...


Count the number of nodes in a binary search tree

Que :-Write a program to count the number of nodes in a binary tree. For example if we have the following tree , then it must return 5. ...


Storage Classes in C

Auto Storage Class 1. Auto variables are declared in the function in which they are to be utilized. For example : void function1 () ...


Reverse a string using pointer in C

void reverse ( char * str) {        char * begin = str;        while (*str) {               str++;        }         char ...


Different Anamolies in Database

Without normalization, it become difficult to handle and update the database without facing data loss. Insertion , Updation and Deletion An...


Wild Pointer , NULL Pointer , Generic Pointer and Dangling Pointer in C

Wild pointer: A pointer in c which has not been initialized is known as wild pointer. Example: # include<stdio.h> int main(){ ...


Print "Hello World " without semicolon

How will you print “Hello World” without semicolon? There can be many ways.  One of them is following. #include<stdio.h> int mai...


Trigger and Procedure in database

What is a Trigger? A Trigger is a stored procedure that is associated with insert, update or delete operations. The code is executed autom...


Difference between Primary key and Unique Constraints

What is the difference between primary key and unique constraints? Both primary key and unique key enforces uniqueness of the column on w...


Given a calculator that only has the + operator. How would you implement *,-,/.

Multiplication ( * ) operation We can add the first number, second number of times. Say i=4, j=5; //Run a for loop for 5 times(j), add...


Memory leak

What is memory leak ? In computer science, a memory leak occurs when a computer program incorrectly manages memory allocations. When Dy...


Widening(Up Casting) and Narrow(Down Casting) Conversion in Java

Q: - What are the two type of Conversion in Java and UP Casting , Down Casting? When the automatic conversion takes place then it is know...


Public static void main() based question in Java

Q. Why main function is defined as public and static? Ans:-  Public access specifier is specified so that the program wud be visible outsid...


Explain JVM , JRE , JIT , JDK in detail.

JDK (Java Development Kit) :- IT contains Java Compiler , Debugger , libraries , bundling and deployment tools. It contains all the tools ...


Why is Java so Secure and Platform independent language ?

Answer is byte code . Java is first compiled into byte code which is intermediate language between machine code and source code . This by...


Difference between Multiprogramming , Multitasking , Multiprocessing and Multithreading Operating System

Multiprogramming  In multiprogramming more than one program reside in the main memory. When one job is unable to execute because of I/O o...


Efficient Binomial Coefficient

Write a function that takes two parameters n and k and returns the value of Binomial Coefficient C(n, k). For example:- if k=8 , n= 2 resul...


Difference between String, StringBuilder and StringBuffer in Java

String     String Builder String Buffer Immutable         Mutable              Mutable Synchronised(thread saf...


Indexing in database

An index in database is a data structure that improves the speed of retrieval operation at the cost of some extra memory.Indexes are used t...


Joins in database

Explain all the Joins ? An SQL join clause combines records from two or more tables in a database. It creates a set that can be s...


Level Order Traversal of binary search tree

Que : Write a program to print the node of tree level wise(one level at a time) . For example if we have the following tree then the output...


Delete, Drop and Truncate Difference

Delete Delete is used to delete a particular row or all the row using the where clause or without using it . Syntax for delete command i...


External Sorting (Handy one in the case of Memory Limit )

External sorting is a term for a class of sorting algorithms that can handle massive amounts of data. External sorting is required when the...


Daffodil Interview Solution -Set 1

Que:Write a program to print following output from given input. Input: aaa bbb ccc ddd eee fff ggg hhh iii jjj Output: bbb aaa ddd ccc ...