Please slove all these questions in C language In your own w
Please slove all these questions in C language
In your own words, what is a data structure? If an application requires the following kinds of questions answered: What item is at position n? Is item x in the list? What is the last item in the list? Is an array good choice for the underlying structure in the application? Explain. Provide an example application for which a list is appropriate. Please be sure to provide details with your application.Solution
Question 1>2 >
In array storing a data and it can be access randomly
array provide random access mechanism.
a >
so it means we have access what item at position n
like array[n]
or base_address+size*n we can access the element
b> we can search what item present in array list
using sequential access of array element
c. you have directly jump last position of array if you know the size of array
array[last] means we have access last element of array
3 Array is good for searching and access the element
because we access the array in constant time but other data Structure we can;t access a data in constant time so for access a element then array is best storing technique
Array provide Random access mechanism to access the array in constant time
but array not for good to insertion and deletion of element.
if we want to insert a element in middle of array then you unnecessary shift the element of array but in case of link list there is no need of shifting a element in this case just you break two link and add two link then added
Data structure is a way of storing and organizing data in a computer so that it can be use efficiently
That means data , a data structure is a specialized format for organizing and storing a data.
basically data structure two types
1 Linear data structure an d Non linear data structure
Linear data structures: Element are access in sequential order
example array ,linklist...etc.
Non_linear Data structure Element are access and store in non-linear order
like Graph and tree.

