What are the characteristics of a good algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM13688233

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.

Reference no: EM13688233

Questions Cloud

Determine how fast must an alpha particle : How fast must an alpha particle (m = 6.68×1027 kg, q = 3.20×1019 C) travel perpendicularly to the Earth's magnetic field in a laboratory (B = 5.02×105 T) for it to describe a circular path of radius 2.34 cm
What was the price of the stock following the split : What was the price of the stock following the split
Equipment cost : Equipment cost
Find the magnitude of the force per unit length : Two parallel wires are separated by a distance of 5.00 cm. Each wire carries a current of 2.70 A in the same direction. Find the magnitude of the force per unit length exerted by one of the wires on the other. Is the force attractive or repulsive
What are the characteristics of a good algorithm : What is an algorithm? What are the characteristics of a good algorithm and what do you mean by complexity of an algorithm? Explain the meaning of worst case analysis and best case analysis with an example.
Cultural values and international differences in business : Cultural Values and International Differences in Business Ethics
What is the magnetic field strength : A solid wire with a radius of 3.00 mm carries a current of 0.0530 A. Assume the current is uniformly distributed in the wire. What is the magnetic field strength at the center of the wire
What is the temperature of the gas : The number of density in a container of neon gas is 5.00 x 1025 m-3. The atoms are moving with an rms speed of 550 m/s. What is the temperature of the gas
What is the mass of sample : The activity of a sample of 3516S (T1/2 = 7.55 x 106 s) is 3.40 x 105 decays per second. What is the mass of sample

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  What are the two methods of representing a binary tree

What is a first-in-first-out data structure ?  Write algorithms to perform the following operations on it - create, insertion, deletion, for testing overflow and empty conditions.

  Efficient algorithm to achieve goal using few base stations

Certain points along the road, so that every house is within four miles of one of the base stations. Give an efficient algorithm that achieves this goal using as few base stations as possible.

  In this assignment you will write an essay on protein

in this assignment you will write an essay on protein requirements. begin by performing an internet search for high

  Describe and implement fft algorithm cooley-tukey

Describe and implement in C++ FFT algorithm "Cooley-Tukey". Also, implement naive DFT and compare naive DFT with FFT using: a sample of the signal x(t) = t

  Creating an object oriented data model

Create an object oriented data model, including all appropriate notations, to represent the given situation. In a particular region there are a number of gardens.

  Write code to implement the expression

Write code to implement the expression: A= (B+C) * (D+E) on 3-, 2-, 1- and 0- address machines. In accordance with programming language practice, computing the expression should not change the values of its operands. Show all instructions.

  An infix expression is one in which operators are located

an infix expression is one in which operators are located between their operands. this is how we are accustomed to

  Create the entity relationship diagram

Create the entity relationship diagram for your project database based on the initial data requirements.

  Your final project is a script which performs a fundamental

your final project will utilize many of the various skills that you have learned throughout this course. the final

  Algorithm to minimize average difference between height

The problem is to assign each skier a ski to minimize the average difference between height of a skier and his/her ski. Give pseudocode and write its asymptotic running time.

  Maintain the set of campers enrolled in camp posanivee

Campers are enrolling and withdrawing from camp faster than her primitive filing system can handle, and she has turned to you. You have been offered free meals at the mess hall in return for a program that will help her keep track of who is enroll..

  Create algorithm-smallest element-set of combined elements

Assume that X and Y are two sorted sequences, comprising m and n elements respectively. Create the algorithm to nd kth smallest element in set of m + n combined elements.

Free Assignment Quote

Assured A++ Grade

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!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd