# Data Structures Interview Questions

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

#### Linear Type Data Structure

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

#### Shubham gupta

• Nov 27th, 2014

Array can be accessed randomly so it is not a linear data structure

#### seshu

• Oct 6th, 2014

All the above

•

#### sonya

• 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.

•

#### rohit vishvakarma

• 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

#### izedonmi ezekiel awele

• 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?

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.

#### Franklin Fujimori

• 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 ...

#### samiksc

• 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

What is Circular Queue? Explain with examples.

#### siddhi parkar

• 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.

#### piyushbeli

• 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

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

#### saurabh singh

• 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

```Code
#include<stdio.h>
#include<stdlib.h>

int main(int argc, char *argv[])
{
if(argc<2)
{
printf("Enter CLA") ;
return 0 ;
}

printf("%s",argv[1]) ;

int n = atoi(argv[2]) ;

for(int i=0;i<n;i++)
printf("_%s ",argv[1]) ;
return 0 ;

}```

#### Abhishek

• 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

What is the difference between structure and union?

#### bhushanpatil31

• 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 remove some keys in ArrayList

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

#### gourab

• 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.

•

#### Marbles and Floors

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?

#### Saurabh

• 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...

#### Shahnawaz

• 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...

•

#### Niyas Ibrahim

• 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.

#### jignesh

• 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

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

#### Lovelyn Rose

• 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.

#### Sweetu

• 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

Relationship between transfer function and homogeneous solution

#### kirankumartana

• Jun 30th, 2013

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

•

#### mahesh

• 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...