Series: Subject: Topic:

# Data Structures Interview Questions

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

Transfer function

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

Relationship between transfer function and homogeneous solution

How to check whether linked list is circular?

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

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

The hashstring() member function is called by other member functions of the hashtable class whenever a function needs to convert a ________________.

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

Skill/topic: hash tablea) a hash number key to a keyb) key to a hash number keyc) a key to an indexexplanation: the hashstring() member function is another function called by other member functions of the hashtable class whenever a function needs to convert a key to a hash number key. The hashstring()...

Answered by: rasheed on: Feb 14th, 2013

C) a key to an Index

Answered by: Sandhya.Kishan on: May 21st, 2012

The hashString() member function is called by other member functions of the Hashtable class whenever a function needs to convert a key to hash number key.

The number of swappings needed to short the numbers 8, 22, 7, 9, 31, 19, 5, 13 in ascending order using bubble sort is 1. 11 2. 12 3. 13 4. 14

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

Answered by: Nitish Kamal on: Jan 27th, 2013

Answered by: Ranjan Kumar Ojha on: Mar 13th, 2007

ans will be 14. you can check. #include<iostream> using namespace std; int main() {     int a[]={ 8, 22, 7, 9, 31, 19, 5, 13 };int counter=0;     for(int i=0;i<...

What is the size of a void pointer ?

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

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

Answered by: ilushka on: Jul 29th, 2011

all pointers are the same size, they only differ on the platform and the amount memory you are trying to address. for example, on an 8051 platform it's 3 bytes, on an intel it's 32 or 64 bits wide.

Getinstance()...

Asked By: Divya6171 | Asked On: Aug 20th, 2012

Please, can anybody answer me that when to use getinstance() and which class having getinstance(),i could not find that method in class class also.

Answered by: RITENDRA on: Nov 1st, 2012

getInstance() method is written inside a class to access the instance of the class from other class. Basically, this is used to ensure that only one instance of the particular class has been created....

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: pankaj on: Oct 23rd, 2012

Top of stack

Answered by: raj on: Sep 21st, 2012

B) Front of the linked list i.e top

Can a linked list store data other than integers?

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

Skill/topic: stacks and queues: insert, delete, peek, finda) yesb) noexplanation: integers are usually used, but you can modify the data type of the data in the definition of the node to change the kind of data stored in the linked list.

Answered by: real on: Oct 18th, 2012

When we are using structure variable then i will say yes!

```Codestruct node{
int info;
string name;
float average;
node *node;
};```

Answered by: Rahul Goyal on: Jul 20th, 2012

link list is a data structure not a property of integers...
so, the data the it store can be anything like a class object or structure object etc.

Write a program to insert a node at a given position in a single linked list?

Asked By: Rajasekhar | Asked On: Sep 25th, 2011

Answered by: rjshkr on: Sep 28th, 2012

"c NODE insert(NODE head,int data,int pos) { NODE temp,new,prev = NULL; int i=1; new = (NODE)malloc(sizeof(struct node)); new->info = data; if(head == NULL) { new->link = ...

Answered by: Rahul goyal on: Jul 20th, 2012

```Code//let the structure name be stud
void insert_pos(stud *head, pos)
{
stud s,*t;
s.input(); //accept the data
pos--;
while(t!=NULL && pos)
{
t=t->next;
pos--;
}
s->next=t->next;
t->next=s;
}
```

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

What happens if an invalid index value is passed to a function?

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

Skill/topic: stacks and queues: insert, delete, peek, finda) if an invalid index is passed, the function terminates without further processing. [explanation] functions that use an index value always determine if the index passed to them is valid before using the index value . If an invalid index is...

Answered by: Sandhya.Kishan on: Jul 25th, 2012

If the user passes in an invalid index, the program will cause an assertion error. While this is useful to indicate to the user that something went wrong, so they can deal with it as appropriate.

Iterative algorithm

Asked By: zoya | Asked On: Oct 22nd, 2011

Design an iterative algorithm to traverse a binary tree represented in two dimensional matrix

Answered by: Sandhya.Kishan on: Jul 16th, 2012

A binary tree can be traversed using only one dimensional array. InOrder_TreeTraversal() { prev = null; current = root; next = null; while( current != null ) { if(prev == current.parent) { prev = cu...

Why resultset being an interface can call next()

Asked By: j_priyaa | Asked On: Nov 15th, 2007

Answered by: Sandhya.Kishan on: Jul 16th, 2012

A class which implements an interface implements its methods.When we obtain a reference to a ResultSet then we are getting an instance of a class that implements the ResultSet interface.Hence class provides concrete implementations of all of the ResultSet methods.

Asked By: unconquerable | Asked On: Nov 3rd, 2010

While creating a heterogenous linklist we know that we use void pointer. But when we need to read the information, how will you do it? How will you figure out to what datatype does the data belong to?

Answered by: Sereche on: Jul 8th, 2012

Some kind of information regarding the type is obviously required. If there is no way of determining it from the context (i.e., the previous node in the list somehow specifies the type), it must be st...

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: Sereche on: Jul 8th, 2012

Sounds like a simple binary search to me. For 100 floors, you would need at most 7 marbles to reach an answer. More generally, with n floors, you would need ceiling(Log2(n+1)) marbles. If the floors ...

Fuzzy logic system rely on

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

1. Crisp binary choices 2. Ambiguous data 3. Decision makers 4. All of them

Answered by: Sandhya.Kishan on: Jun 13th, 2012

Fuzzy logic system relays on all Crisp binary data, ambiguous data and on decision makers.

First | Prev | | Next | Last Page