This is a Quicksort example from the book
Java: A Beginners Guide(5th edition):
Maybe I've been looking at it for so long now that I'm missing the obvious but I can't understand why I get the below error:
Original array: dxarpji
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 7
at Quicksort.qs(Quicksort.java:22)
at Quicksort.qsort(Quicksort.java:6)
at QSDemo.main(QSDemo.java:16)
Can anybody please advise?