As I was
testing my quicksort I noticed a problem. Sometimes it arranges the array in alphabetical order and sometimes it does not. A more clear is example it like if I have
"p, o, j, l" as my array it sorts it to
"j, o, l, p" which is wrong.
"l" should be before
"o" However if I add
"a" to the array it sorts to
"a, j, l, o, p" which is correct. Why is this happening?
My code: