Category: Javaskool Category

What is the difference between NULL and VOID pointer in Data Structures? 0

What is the difference between NULL and VOID pointer in Data Structures?

NULL can be value for pointer type variables. VOID is a type identifier which has no size. NULL and void are not same. Example: void* ptr = NULL;

What is the difference between ARRAY and STACK in Data Structures? 0

What is the difference between ARRAY and STACK in Data Structures?

STACK follows LIFO. Thus the item that is first entered would be the last removed. In array the items can be entered or removed in any order. Basically each member access is done using...

Tell how to check whether a linked list is circular? 0

Tell how to check whether a linked list is circular?

Create two pointers, each set to the start of the list. Update each as follows: while (pointer1) { pointer1 = pointer1->next; pointer2 = pointer2->next; if (pointer2) pointer2=pointer2->next; if (pointer1 == pointer2) { print (”circularn”);...

What is a data structure node class? 0

What is a data structure node class?

A node class is a class that, – relies on the base class for services and implementation, provides a wider interface to users than its base class, – relies primarily on virtual functions in...

What is the easiest sorting method to use in data structures? 0

What is the easiest sorting method to use in data structures?

The easiest sorting method to use in data structures is the standard library function qsort(). It’s the easiest sort by far for several reasons: – It is already written. – It is already debugged....

How can I search for data in a linked list? 0

How can I search for data in a linked list?

Unfortunately, the only way to search a linked list is with a linear search, because the only way a linked list’s members can be accessed is sequentially. Sometimes it is quicker to take the...

What is the heap in data structures? 0

What is the heap in data structures?

The heap is where malloc(), calloc(), and realloc() get memory. Getting memory from the heap is much slower than getting it from the stack. On the other hand, the heap is much more flexible...

What do you mean by Radix Sort? 0

What do you mean by Radix Sort?

The radix sort takes a list of integers and puts each element on a smaller list, depending on the value of its least significant byte. Then the small lists are concatenated, and the process...

What do you mean by Merge sort? 0

What do you mean by Merge sort?

The merge sort is a divide and conquer sort as well. It works by considering the data to be sorted as a sequence of already-sorted lists (in the worst case, each list is one...