BSc Computer Science Semester 2 Answer #1



Here are all the answers of the questions given in the TOPIC 1 . All the answers are arranged according to their questions respectively. I hope these answers will be helpful.


Data Structure Answers

1.    A Data Structure is a data organization, management, and storage format               that enables efficient access and modification.


2.     


3.    Primitive Data Types:- These data types are the general and                                fundamental data types. Eg:- int, byte, short, float and Boolean.

       Derived Data Types:- These data types are made by using any other                    data types. Eg:- Array
       
          User-defined data Types:- These Data Types are defined by the  user. Eg:- Classes,             Structures, Union, Pointers.


4.    Algorithm is a finite sequence of instructions /steps, each of which is very                       elementary that must be followed to solve a problem.
        
        Properties of Algorithm :-
  •  Input - There are some inputs, which are externally supplied.
  • Output - The result should be produced after completion of the job to the user.
  • Definiteness - The instructions should be unique, concise, clear and unambiguous.
  • Finiteness - The instruction should be relative in nature and should  not be of an infinite type.
  • Effectiveness - Repetition of steps should be avoided. It must be feasible.
5.   Linear Data Structures :- The data structure is non-linear if every data items related       to its previous and next data items. Eg :- Array, Stacks and Queues.(Sequential) Eg :- Linked Lists, Linked Stacks, and Linked Queues.(Linked)

    Non-Linear Data Structures :- A  data structure is non-linear if every data item        attaches to many other data items inn specific ways to reflect relationships. Eg:- Graphs and Trees.

6.    The static data structure is a kind of data structure, in which once memory space is allocated it cannot extend, i.e. the memory allocation for the data structure takes place at compile-time that cannot be changed afterwards. Example: Array

Dynamic Data Structure is another kind of data structure, which can be extended or shrink during the execution, i.e., the memory allocation as well as memory de-allocation for the data structure takes place at run-time and allocates memory as required amount at any time. Example: linked list, stack, queue, tree

7.     An Abstract Data Type (ADT) describes the data objects, which constitute the data     structure and the fundamental operations supported on them.
        Eg :- Arracks, Stacks and Queue

8.    A time-space trade off is a situation where time increases and space decreases or               space increases and time decreases in a algorithm.

9.    Time Complexity :- The time complexity of an algorithm quantifies the amount of                                            time taken by an algorithm with respect to the input size.

       Space Complexity :- Space Complexity of an algorithm is the total space taken by                                             the algorithm with respect to the input size. 

10.    Big Oh notation(O) :- It is define as upper bound and upper bound on an                                                         algorithm is the most amount of time required (worst case                                                 performance).

        Big Omega notation(Ω) :- It is define as lower bound and lower bound on an                                                           algorithm is the least amount of time required (best case                                                    performance). 

        Big Theta notation(θ) :- It is define as tightest bound and tightest bound on an                                                        algorithm is the best of all the worst case times that the                                                    algorithm can take.

11.    Asymptotic Notations are used to represent the complexities of algorithms for                 asymptotic notations.

         In Asymptotic analysis, we evaluate the performance of an algorithm in terms of             input size. We calculate , how the time or space taken by algorithm increases with             the input size.

Comments

Popular Posts