been set a task of writing a piece of code but i seriously dont have a clue where to start or even how to do it. I study multimedia computing and fine with the website design/graphic design but cant get my head around this programming.
can anyone help please
1. Use pseudocode to implement an algorithm which searches for values in a given ange. It should fit the following description:
INPUT: An unsorted array A and two integers l and u
OUTPUT: TRUE if A contains an element which is both greater than l and less than u, FALSE otherwise
You should make a note of the algorithm’s time complexity using O-notation and show the pseudocode to a member of staff before implementing as a function.
2. Now consider the problem when the array is sorted. You should be able to improve on the efficiency of the algorithm by using a divide and conquer approach. Write pseudocode and give the time complexity of the algorithm using Big O notation. If there is time available you should implement the algorithm with code, although this is not essential.