Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Program: Creation of a linked list
In the next example, wewill look to the process of addition of new nodes to the list with the function create_list().
#include
#define NULL 0
structlinked_list
{
int data;
structlinked_list *next;
};
typedefstructlinked_list list;
void main()
list *head;
void create(list *);
int count(list *);
void traverse(list *);
head=(list *)malloc(sizeof(list));
create(head);
printf(" \n traversing the list \n");
traverse(head);
printf("\n number of elements in the list %d \n", count(head));
}
void create(list *start)
printf("input term -1111to getting out of the loop\n");
scanf("%d", &start->data);
if(start->data == -1111)
start->next=NULL;
else
start->next=(list*)malloc(sizeof(list));
create(start->next);
void traverse(list *start)
if(start->next!=NULL)
printf("%d --> ", start->data);
traverse(start->next);
int count(list *start)
if(start->next == NULL)
return 0;
return (1+count(start->next));
Data array A has data series from 1,000,000 to 1 with step size 1, which is in perfect decreasing order. Data array B has data series from 1 to 1,000,000, which is in random order.
How divide and conquer technique can be applied to binary trees? As the binary tree definition itself separates a binary tree into two smaller structures of the similar type,
Q. Assume that we have separated n elements in to m sorted lists. Explain how to generate a single sorted list of all n elements in time O (n log m )?
How can we convert a graph into a tree ? Do we have any standardized algorithm for doing this?
Insertion & deletion of target key requires splaying of the tree. In case of insertion, the tree is splayed to find the target. If, target key is found out, then we have a duplicat
Q. Create a heap with the given list of keys: 8, 20, 9, 4, 15, 10, 7, 22, 3, 12 Ans: Creation
Book to refer: Introduction to Algorithms, 3rd Ed, by Clifford Stein, Thomas H. Cormen, Ronald Rivest, Charles E. Leiserson Question: Tic Tac Toe game -Design a GUI and implement
explain deletion and insertion in a queue
This unit discussed about data structure called Arrays. The easiest form of array is a one-dimensional array which may be described as a finite ordered set of homogeneous elements
sir how can i explain deletion process in a data structure
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd