perche' in ricerca() fai ripartire il ciclo for da 0,
quando in a avresti l' indice corretto da cui continuare la ricerca?