Java Algo to Find smallest and second smallest Number in List
<p>I need to find smallest and second smallest number in a list.</p>

<p>Can I do this using <b>single</b> loop?
Also, we need to consider the case of two multiple occurences of a number.</p>

<p>Ex: 1. from list [20,30,90,50] output 20 ,30 
2. from list [30,30,90,50] output 30 ,30</p>

<p>plz help</p>
