Talk:Interpolation search
From Wikipedia, the free encyclopedia
implementation seems to be defective.
it crashes with an exception!
No, it doesn't... What exceptions are you getting and what parameters do you use??
int[] a={1,2,3,4,5,6,7,13,43,65, 87,111,134,153,413,654,764,875,987};
System.out.println(interpolationSearchb(a,8)); // Prints correctly -1
System.out.println(interpolationSearchb(a,153)); // Prints correct 13
System.out.println(interpolationSearchb(a,999)); // Prints correct -1
--Dodno 08:00, 19 November 2006 (UTC)