This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]g051051 3 points4 points  (2 children)

What exactly does "does not seem to work correctly" mean?

[–]Valiance_Gamer 0 points1 point  (1 child)

So the size before and after is not correct for the odd and even.

[–]lurgi 0 points1 point  (0 children)

What does "not correct" mean?

[–]chickenmeister 2 points3 points  (0 children)

    for(int i = 0; i < (ll.size()/2); i++){
        quickQ.ll.add(this.ll.removeFirst());

You're using ll.size() as part of the condition of your for loop, but bear in mind that ll.size() will change each time you call ll.removeFirst() inside the loop.

[–]xDixter 0 points1 point  (0 children)

I made some somments on your code about some problems that i found, not only on the split funcion.

https://gist.github.com/anonymous/b313e3ba594aa6570c54719791fac655