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 is the time complexity of running quicksort

Consider your textbook's implementation of quicksort from chapter 8. The corrected findPartition method is included below for your convenience.

  Create algorithm to read arbitrary number of data record

Create the algorithm to read arbitrary number of data records, each containing name, age, and code. Code of 1 will indicate female, a code of 2 will indicate male.

  Uml graphical notation to define the object classes

Use UML graphical notation, construct the design for the system to define the object classes and show the interaction of the data collection sub systems.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Explaining augmented red-black tree

Consider T be augmented red-black tree, where each node x has attribute x.size, which is number of internal nodes in subtree rooted at x. Given such augmented red-black tree T.

  Develop a solution for the problem and mention algorithms

Spaces between tokens are allowed but not required. The program will convert the (user input) infix expression to postfix (RPN) form and display the converted expression on the screen.

  Creating financial tracking program

Acme Inc. is making next generation financial tracking program, and Alice has been provided the task of writing encryption component.

  Create an er diagram

Create an E-R diagram with all appropriate notation for the following condition. In a particular fruit growing region there are a number of orchards.

  Ford-fulkerson algorithm on capacities

Write code that finds a maximum flow in a directed graph, using the Ford-Fulkerson algorithm on capacities given as matrix void maximum flow(

  Describe an algorithm to play the game of nim

Describe an algorithm to play the Game of Nim using all of the three tools discussed in class (pseudocode, flowchart, hierarchy chart).

  Develop a sequential flow diagram

Develop a sequential flow diagram and a sequential VI in LabVIEW that illustrates how to solve the following problem, and provides a correct solution.

  Determining worst-case time complexity

The recent discovery of the following fragment of uncommented procedural C code in the Sunlab has caused a big scandal. What is the worst-case time complexity of foo(a,1,N,k), and for which inputsdoes it occur?

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