Day 7 (5.MAY.19)
Problem Set - 4th May 2019
Problem Set - 4th May 2019
- Design a procedure to perform Linear search on list of N unsorted numbers. It take an array and the key element to be searched and returns the index of the element of key element if found. Else returns -1
- LinearSearch( a[5,4,3,2,1], 4) -> 2
- LinearSearch( a[90, 123, 324, 21, 56], 22) -> -1
- Design a procedure to determine if a given string is a Palindrome
- Palindrome("racecar") -> True
- Palindrome("raptor") -> False
- Design a procedure to calculate the squareroot of a number "without using the math function sqrt".
- Squareroot(36) -> 6
- Design a procedure to determine the frequency count of numbers in a given list
- Frequency( a[1,3,2,1] ) -> 1 : 2, 2 : 1, 3 : 1
- Encryption of the files
RESULT :
RESULT :
All the above programs have been worked out and saved here.