Series: Subject: Topic:

Data Structures Interview Questions

Showing Questions 1 - 20 of 249 Questions
First | Prev | | Next | Last Page
Sort by: 

List all the employees

Asked By: Swapnil Sawant | Asked On: Oct 12th, 2014

List all the employees who have atleast one person reporting to them list the employee details if and..

Linear type data structure

Asked By: senthilkumar3355 | Asked On: Feb 19th, 2010

Which of the following data structure is linear type?A. Stringsb. Listsc. Queuesd. All of above

Answered by: seshu on: Oct 6th, 2014

All the above

Answered by: hervinder on: Apr 30th, 2010

Basically data structures are two time linear and non linear.List Queues and arrays are linear data structures.

The way a card game player arranges his cards as he picks them up one by one, is an example of 1. Bubble sort 2. Selection sort 3. Insertion sort 4. Merge sort

Asked By: Rujul | Asked On: Mar 25th, 2007

Answered by: Malang jan afridi on: Sep 4th, 2014

Dear All,
Insertion sort

Answered by: ankitschopra on: Nov 4th, 2013

Inserion Sort

What is inverted file?

Asked By: aash202 | Asked On: Jun 29th, 2014

Answered by: sonya on: Aug 28th, 2014

An inverted file is generally built on each field of the data structure. In other words, if your database has fields for color, height, composition, and price, an inverted file will be built on each of those four fields.

What is linear and non-linear data structures?

Asked By: Raji | Asked On: Jun 18th, 2006

Answered by: rohit vishvakarma on: Aug 20th, 2014

Linear data structure: A data element which access line by line and sorted in linear position is know as linear D.S

Non linear data structure: Which a data item is connected to several other data item is known as non linear D.S

Answered by: izedonmi ezekiel awele on: Apr 3rd, 2012

Linear data structure is such that they are contiguous either by their arrangement in successive memory locations or by means of pointers. To help you understand it better, let say you were given a bo...

What is the relationship between a queue and its underlying array?

Asked By: Interview Candidate | Asked On: Dec 10th, 2005

Skill/topic: queuea) data stored in a queue is actually stored in an array. The queue tracks which array element is at the front of the queue and which array element is at the back of the queue.

Answered by: Franklin Fujimori on: Jul 8th, 2014

A queues elements may be stored in an array. Two indexes, front and end will be used to identify the start and end of the queue. When an element is removed front will be incremented by 1. In case it ...

Answered by: samiksc on: Jan 19th, 2006

A queue's elements may be stored in an array. Two indexes, front and end will be used to identify the start and end of the queue. When an element is removed front will be incremented by 1. In case it ...

Circular queue

Asked By: shiv sinha | Asked On: Nov 10th, 2008

What is circular queue? Explain with examples.

Answered by: siddhi parkar on: Jul 6th, 2014

In linear queue once the size is full we cannot add another items cause rear is at rightmost .
but in circular list to add element even if its full you will move front and rear in clockwise direction.

Answered by: piyushbeli on: Apr 13th, 2009

In a normal Queue when queue becomes full we can not add more items, so following items are lost.  But in a circular queue when queue becomes full it will start overwriting the items from beg...

C program to replication of string

Asked By: Rakesh | Asked On: Oct 14th, 2011

Write a C program to implement the replication of string which will be given as a command line argument?

Answered by: saurabh singh on: Jun 19th, 2014

Here is a simple code using command line argument to print multiple number of strings with "_" between them. To check the output , type this in command prompt : filename ABC 5 OUTPUT: ABC_ABC_ABC_ABC_ABC

  2. #include<stdio.h>
  3. #include<stdlib.h>
  5. int main(int argc, char *argv[])
  6. {
  7.         if(argc<2)
  8.         {
  9.                 printf("Enter CLA") ;
  10.                 return 0 ;
  11.         }
  13.     printf("%s",argv[1]) ;
  15.         int n = atoi(argv[2]) ;
  17.     for(int i=0;i<n;i++)
  18.         printf("_%s ",argv[1]) ;
  19.         return 0 ;
  21. }

Answered by: Abhishek on: Nov 11th, 2011

"c #include #include #include char * string_repeat( int n, const char * s ) { size_t slen = strlen(s); char * dest = calloc(n*slen+1, sizeof(char)); int i; char * p; ...

Structure and union

Asked By: shruthi20 | Asked On: Jan 17th, 2014

What is the difference between structure and union?

Answered by: bhushanpatil31 on: Apr 6th, 2014

Memory is allocated cumulatively for all members of structure while in case of union, memory for largest element only is allocated

How to reverse a linked list without usinf any pointer of c?

Asked By: noor.lalu | Asked On: May 2nd, 2013

Answered by: shaan on: Mar 30th, 2014

Use stack. push all the elements in stack and again insert this elements from stack to linked list. This will be your reverse linked list

How to remove some keys in arraylist

Asked By: mannam haribabu chowdary | Asked On: Aug 26th, 2012

Hi. this a class employee containes EId and ename are datamembers. When these employee class objects are stored in arrary list i want to remove EId containes 100 and 1000 plz replay to me

Answered by: gourab on: Mar 14th, 2014

Use varray or nestet table to store the array list.
the if want to remove use DELETE(n) method to specify the element to remove from the list.

The front of the stack in a stack-linked list ______________.

Asked By: Interview Candidate | Asked On: Dec 10th, 2005

Skill/topic: stacks using linked lista) back of the linked listb) front of the linked listc) middle of the linked listd) none of the above

Answered by: srishti on: Feb 20th, 2014

Top of the stack

Answered by: Shraddha on: Feb 1st, 2014

A)Back of the linked list.

Consider a linked list implemented of a queue with two pointers: front and rear. What is the time needed to insert an element if the queue is of length n?

Asked By: nehaj1993 | Asked On: Feb 7th, 2013

Answered by: ankitschopra on: Nov 3rd, 2013

In Queue Insertion can only take place in the end. Since we have pointer to front and rear, We only require one step to insert at the rear.

Answered by: Shahnawaz on: Sep 2nd, 2013

O(1). Insert element at rear.

Marbles and floors

Asked By: hari_nowayout | Asked On: Mar 26th, 2011

You have a 100-story building and a couple of marbles. You must identify thelowest floor for which a marble will break if you drop it from this floor. How fastcan you find this floor if you are given an infinite supply of marbles? What if youhave only two marbles?

Answered by: Saurabh on: Sep 6th, 2013

U can use Binary search for this .. First start at last floor say 100 .. If it breaks ( remember we do not know how strong the marble is ) .. then go to floor 50 .. if it breaks go to 25th floor .. if...

Answered by: Shahnawaz on: Sep 2nd, 2013

Solution when we have only two marbles Use below sequence to find out correct floor 14,13,12,11,10,9,........... First drop the first marbel on floor 14th, if marbel breaks go to lower floor till 1s...

What is the size of a void pointer ?

Asked By: anupam verma | Asked On: Dec 4th, 2006

Answered by: Niyas Ibrahim on: Sep 2nd, 2013

Use of pointer is to store a memory address.since any location in the memory have same type(characters or digits) of memory address, size is same for all pointer types.

Answered by: jignesh on: Dec 29th, 2012

Size of void pointer or size of character pointer are same because both variable contain address or we can say memory location

Linear and non-linear data structures

Asked By: diwakarprasadbyahut | Asked On: Aug 24th, 2008

Explain what are linear data structure & non-linear data structure?

Answered by: Lovelyn Rose on: Jul 2nd, 2013

In a linear data structures, if we traverse from an element, we can strictly reach only one other element. In a non-linear data structure, traversing from an element can lead lead to more than one element.

Answered by: Sweetu on: Aug 13th, 2011

Linear data structure: A linear data structure traverses the data elements sequentially, in which only one data element can directly be reached. Ex: Arrays, Linked Lists Non-Linear data structure: Ev...

Transfer function

Asked By: anshul malhotra | Asked On: May 6th, 2013

Relationship between transfer function and homogeneous solution

Answered by: kirankumartana on: Jun 30th, 2013

It is the ratio of laplace transform(input to out put) of any system with out changing time domain

How to check whether linked list is circular?

Asked By: noor.lalu | Asked On: May 2nd, 2013

Answered by: mahesh on: Jun 17th, 2013

get two pointer to head of the list. then increment one pointer by two nodes and other by one node. if list is circular at some point both pointers will be pointing to same node. else u will encounter...

What is the size of char pointer (in bytes)

Asked By: yashwant patel | Asked On: Dec 5th, 2006

Answered by: shivam shrivastava on: Apr 22nd, 2013

In c++, if the pointer object characterized like a type of char ,int or float in array. So the pointer address contains the 2 bytes address.

Answered by: Nidhi on: Feb 19th, 2007

Actually a pointer is just a address holder so its size is always that of an int data type,what ever may be the type of pointer.In a 16-bit compiler,its 2 bytes and in 32-bit compiler,its 4 bytes(ie depeds on sizeof(int))

User stories and use case

Asked By: azeem abdul | Asked On: Apr 2nd, 2013

What is the difference between user stories and a use case

First | Prev | | Next | Last Page





twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.