ESC101 : fundamental of computing
Lecture 28 17 October, 208
In this lecture we continued discussion on Arrays. We gave description of
the following programs.
1. Generating random number
(see the file random example.java)
Those who are interested in the mathematics underlying generation of
(pseudo) random numbers should visit the link
http://en.wikipedia.org/wiki/Random number generator or go through the
following famous book (available in central library)
Knuth, D.E.: The Art of Computer Programming, volume 2: Seminumer-
ical Algorithms. Addison-Wesley, Reading, MA, 3rd edition, 1997.
2. Filling the entries of an arrays with random numbers
(see the file array random.java)
3. Selection sort : algorithm to sort an array by repeatedly selecting the
smallest element.
(see the file selection sort.java)
4. Generating random numbers less than a given number using Sieve of
Eratosthenes.
(see the file sieve.java).