1. write a function that takes in an array and returns the avg of elements in the array.
2. Write a function that takes in an array and a number n and returns true if n occurs in the array, and false otherwise.
3. Write a function which takes in an array and prints the array in reverse order.
4. Write a function which takes in an array and a number n, and performs swaps of random elements in the array, n times.
5. Write a loop which finds the maximum element of an array.
6. Write a loop which finds the *position* of the maximum element of an array.
7. Go to Wikipedia and look up Selection sort, Insertion Sort, and Bubble. If you can, try to implement these. If not, don't sweat it.
Thursday, November 19, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment