Answer
procedure smallest ($a_1, a_2, a_3, ... a_n:$ set of integers)
smallest $ := 1$
for $i:=2$ to $n$
$\space\space\space$$\space\space\space$ if $a_i\le a_{smallest}$ then smallest $:=i$
return smallest
Work Step by Step
This algorithm attempts to find the last occurrence of the smallest element. Notice that we achieve this by having a less than or equal. Any later occurrences of the smallest element would pass the condition and the index would be updated accordingly.