Problems
You are advised to design recursive and iterative solutions for the following sample problems. You are also encouraged to write the Modular programs (with functions) in C language or Python language for these problems:
Write a program to carry out arithmetic operations (addition, subtraction, multiplication, division) on two numbers.
Write a program to find maximum of two numbers.
Design an algorithm and Write a program to add n numbers provided in a list. Also find a recursive solution. Clearly specify the basis and recursion steps.
Design an algorithm and Write a program to compute factorial of a number. Also find a recursive solution. Also find a recursive solution. Clearly specify the basis and recursion steps.
Design an algorithm and Write a program to find maximum of a list of n numbers provided in a list. Also find a recursive solution. Clearly specify the basis and recursion steps.
Design an algorithm and Write a program to reverse a string of n characters. Also find a recursive solution. Clearly specify the basis and recursion steps.
Design an algorithm and Write a program to find sub-string in a given string. E.g. find "Research" in the string "Institute of Infrastructure Technology Research And Management"
Design an algorithm and Write a program to find nth element in the Fibonacci sequence. Also find a recursive solution. Clearly specify the basis and recursion steps.
Design an algorithm and Write a program to find sum, average and standard deviation of a list of n numbers. Also find a recursive solution. Clearly specify the basis and recursion steps.
Design an algorithm and Write a program to check whether a string of n characters is palindrome or not. Also find a recursive solution. Clearly specify the basis and recursion steps.
Design an algorithm and Write a program to carry out following vector operations:
element wise addition of two vectors
element wise subtraction of one vector from the other
dot product of two vectors
Also find a recursive solution. Clearly specify the basis and recursion steps.
Design an algorithm and Write a program to carry out following matrix operations:
find transpose of a matrix
addition of two matrices
subtraction of two matrices
multiplication of two matrices
Design an algorithm and Write a program to check whether the given integer is
a prime number
an Armstrong number
Design an algorithm and Write a program to sort a list of n numbers.
Design an algorithm and Write a program to merge two lists.
Design an algorithm and Write a program to merge two ordered lists. Also find a recursive solution. Clearly specify the basis and recursion steps.
Write a program to perform following operations on data files:
read from data file.
write to data file.
append contents of a file to the other file
copy contents of one file to the other file