Write the algorithm that puts the first four terms of a list of arbitrary length in increasing order. Show that this algorithm has time complexity 0 (1) in terms of the number of comparisons used.
The forum rules say that it is expected that you will show some effort. Could you write a first draft of the algorithm, say how lists are represented and accessed, or at least tell what exactly your difficulty with this question is?
Write the algorithm that puts the first four terms of a list of arbitrary length in increasing order. Show that this algorithm has time complexity 0 (1) in terms of the number of comparisons used.
You do realise that this is effectively asking for a sort algorithm for a list of 4 items, don't you?