1. Engineering
  2. Computer Science
  3. 1154 homework 1 cs 425 theory of algorithms due date...

Question: 1154 homework 1 cs 425 theory of algorithms due date...

Question details

11:54 HOMEWORK 1: CS 425 (THEORY OF ALGORITHMS DUE DATE: 01/25/2019 Illustrate the Euclid algorithm (recursive way) to find GCD of the following two numbers: 672,3780. Also, find out how many recursive calls are involved in finding the GCD 2. Write a recursive function that would take an integer N as input and it will display all the numbers starting from N down to 1. Complete the program, by writing the main, and calling it with suitable values of N. . Given the following integer numbers: 24, 17, 6, 19, 1, 0,4,-2 Using Insertion Sort, sort these data in increasing order (from lowest to highest value). Compute the runtime as well. Use the table below 4 Given the following function int Fn(int N) ifN else I) return 5 return 2 + Fn(N/2) Answer the following questions: a What type of function is this-iterative or recursive? Explain biDetermine the value of Fn(15) Show all the steps. s Given the data Using the last element as the pivot, illustrate the Hoare Partition Algorithm. What would be the runtime in terms of number of comparisons.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution