• Post Reply Bookmark Topic Watch Topic
  • New Topic

StackOverflow error using QuickSort  RSS feed

 
Raman Ghai
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there ,
I am getting a Stack Overflow error within the qSort method...Any suggestions or ideas are welcome ..Thanks in advance !!
 
Greg Brannon
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
StackOverflows in recursive methods are caused by infinite recursion. Looking at your qSort() method, what's the exit or base case that causes or allows the recursion to "unwind?"
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!