Analysis of Algorithms
Home work 1 Solutions
Q2.3 Correctness of Horner's Rule
a
constant time operation (y = ai + x.y) is being run n times. Thus
running time is (n)
b
y = 0
for i = 0 to n
xp = 1
for
Analsys of Algorithms - Homework 3 Solutions
Fall 2016
Exercise 15.4-4
When computing a particular row of the c table, no rows before the previous row are needed. Thus only
two rows - 2 length[Y ] ent
CSci 231 Homework 6 SOLUTIONS
Binary Search Trees and Hashing
CLRS Chapter 11.1-11.3 and 12.1-12.3
Write and justify your answers on this sheet in the space provided.1
1. (CLRS 12.2-5) Show that if a
Survey Paper: Sorting Algorithms
A sorting algorithm is an algorithm which results given elements in specified order. Sorting algorithms
are the most important algorithms in the area of computation. I
Longest increasing subsequence
problem
Given an sequence of numbers, find the longest
subsequence with increasing elements
Example: A = (5, 1, 7, 9, 3, 6, 4, 2, 8) the longest
increasing subsequence i