What is an algorithm what are the characteristics of a good


Q.1 A two dimensional array TABLE [6] [8] is stored in row major order with base address 351.What is the address of TABLE [3] [4]?

Q.2 What is an algorithm? What are the characteristics of a good algorithm?

Q.3 What do you mean by complexity of an algorithm? Explain the meaning of worst case analysis and best case analysis with an example.

Q.4 Which sorting algorithm is best if the list is already sorted? Why?

Q.5 Explain external sorting. Why do we require it? How it is different from internal sorting

Q.6 What do you mean by stable sort? Explain with suitable example.

Q.7 Why the Bubble sort algorithm is inefficient?

Q.8 Given the following array:

                                                80     72     66     44     21     33

 After two passes of a sorting algorithm the array has been rearranged as shown below:

                                                21     33     80     72     66     44

  Which sorting algorithm is being used (selection, bubble, insertion). Defend your answer.

Q.9 Write the Best, Average and Worst Case Time Complexity of the following sorting algorithm in tabular Form.

    (1) Quick Sort

    (2) Merge Sort

    (3) selection sort

    (4) Bubble Sort

    (5) Insertion Sort

Q.10 Sort the elements 77,49,25,12,9,33,56,81 using

a) Insertion sort                                                           (d) selection sort

b) Bubble sort                                                               (e) merge

c) Quick sort

Q.11 Sort the following numbers using Radix sort:

100,300,95,60,10,900,800 showing positions of various buckets.

Q.12 Explain Hash Tables, Hash function and Hashing Techniques?

Q.13 Define Hashing. Store the following values in a hash table of table size 11 using division method:  25, 42, 96, 101, 102, 162, and 197. In case of collision, use other hash function H2= 11-(key%11) to solve collision.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: What is an algorithm what are the characteristics of a good
Reference No:- TGS0941798

Expected delivery within 24 Hours