BME-MIT-IET / iet-hf-2022-do-the-thing

iet-hf-2022-do-the-thing created by GitHub Classroom
GNU General Public License v3.0
2 stars 0 forks source link

Fix problem found in Fibonacci Search #28

Open peter-i-istvan opened 2 years ago

peter-i-istvan commented 2 years ago

Problem description: Provoked while running ExploratoryTest.java, on array (9, 3, 2, 1, 4, 6, 8, 5, 4, 7), toFind = 78, stack trace:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 10 out of bounds for length 10
at search.fibonacci_search.FibonacciSearch.find(FibonacciSearch.java:52)
            at ExploratoryTest.testFibonacciSearch(ExploratoryTest.java:96)
            at ExploratoryTest.main(ExploratoryTest.java:158)