Data Structures Interview Questions

Showing Questions 41 - 60 of 269 Questions
First | Prev | Next | Last Page
Sort by: 
 | 
Jump to Page:
  •  

    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.

  •  
  •  

    What is the size of a void pointer ?

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

  •  

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

    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() function requires one argument, a char pointer to the key that is being hashed. The hash number that...

    rasheed

    • Feb 14th, 2013

    C) a key to an Index

  •  

    GetInstance()...

    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.

    RITENDRA

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

  •  

    Can a linked list store data other than integers?

    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.

    real

    • Oct 18th, 2012

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

    Code
    1. struct node{
    2. int info;
    3. string name;
    4. float average;
    5. node *node;
    6. };

    Rahul Goyal

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

    rjshkr

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

    Rahul goyal

    • Jul 20th, 2012

    Code
    1. //let the structure name be stud
    2. void insert_pos(stud *head, pos)
    3. {
    4.   stud s,*t;
    5.  s.input(); //accept the data
    6.  t=head;
    7. pos--;
    8. while(t!=NULL && pos)
    9. {
    10.   t=t->next;
    11.    pos--;
    12. }
    13. s->next=t->next;
    14. t->next=s;
    15. }
    16.  

  •  

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

    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 received, the

  •  

    Iterative Algorithm

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