7. Explain Dynamic Program ming algorithm in contrast to Divide and Conquer algorithm Discuss the advantages of Dynamic Programming over the other iophs method. 5pts) Then find the LCS of the fol...
7. Explain Dynamic Program ming algorithm in contrast to Divide and Conquer algorithm Discuss the advantages of Dynamic Programming over the other iophs method. 5pts) Then find the LCS of the following two strings X ABCBDAB) and Y- (BDCABA) (Explain the algorit g two strings. (He pts) thm as well 8. a) Explain the difference between recursive and iterative algorithms.(2 pts) b) The recursive Euclid algorithm is given as below: int GCD(int a, int b) f (b0) return a else return GCD(b, a % b); (8 Write down this function in Iterative style.
7. Explain Dynamic Program ming algorithm in contrast to Divide and Conquer algorithm Discuss the advantages of Dynamic Programming over the other iophs method. 5pts) Then find the LCS of the following two strings X ABCBDAB) and Y- (BDCABA) (Explain the algorit g two strings. (He pts) thm as well 8. a) Explain the difference between recursive and iterative algorithms.(2 pts) b) The recursive Euclid algorithm is given as below: int GCD(int a, int b) f (b0) return a else return GCD(b, a % b); (8 Write down this function in Iterative style.