DS by keralaguest


									1. What is data structure?
   A data structure is a particular way of storing and organizing data in a computer so that it can
be used efficiently
2. Classification of Data structure?
There are two major types of data structure, linear data structure and nonlinear data structure.
Linear data structure include array linked list stack queue.
Nonlinear data structure include tree graph.
3. Mention Major operation on data structure.
  Traveling searching insertion deletion sorting merging.
4. Differentiate between records and arrays

 5. Differentiate between array and linked lists
An array data structure or simply array is a data structure consisting of a collection of elements,
each identified by at least one index. An array is stored so that the position of each element can be
computed from its index tuple by a mathematical formula. It means array is RAM data structure.
A linked list is that consists of a sequence of nodes each of which contains a reference to the next
node in the sequence. It is ROM data structure.

6. Differentiate between stacks and queues
  A stack is a last in, first out (LIFO) data structure. A stack can have any abstract data type as an
element, but is characterized by only three fundamental operations: push, pop and stack top.
A queue is a particular kind of collection in which the entities in the collection are kept in order
and the principal (or only) operations on the collection are the addition of entities to the rear
terminal position and removal of entities from the front terminal position. This makes the queue a
First-In-First-Out (FIFO) data structure
7. Explain the operation of array, stacks, queue, and linked list.
They have some operation in common like Assignment deletion search Travel.

Stack                                               Pop push
Queue                                               Enqueue dequeue
Linked list

8. What is time complexity of sorting? For search in a sorted array using binary search or
linear search.

The time complexity of an algorithm quantifies the amount of time taken by an algorithm to run
as a function of the size of the input to the problem
 The time complexity of binary search is O (        )
 The time complexity of linear search is O (n)

To top