Reputation: 0 Apprentice
- Active Posts:
- 31 (0.02 per day)
- 21-October 09
- Profile Views:
- Last Active:
- 6 minutes ago
- Viewing Topic: MySQL, select column name based ...
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
Posts I've Made
Posted 1 Feb 2014[quote name='jon.kiparsky' date='01 February 2014 - 12:31 AM' timestamp='1391239876' post='1966019']
return callme(arry, left, right++);
Another nice catch. Fixed it. I'm still getting "Exception in thread "main" java.lang.StackOverflowError".
Posted 1 Feb 2014
Hmm. I definitely made a mistake on that one. Left was initially suppose to be 0 and right was suppose to be the end of the array. So it was returning me my array unsorted because right was already greater than left on the first call.
if(left>=right)but now i'm getting a "Exception in thread "main" java.lang.StackOverflowError". We're getting close.
Posted 31 Jan 2014I'll try to explain it as best as i can. The "left" variable starts at index 0 and the right variable starts at the end of the index. They are then bothide compared, if left is an odd number and right is an even number then they swap values. If left turns out to be an even number then no swap takes place and it points at the next index in the array. If right turns out to be an odd number then no swap takes place and it points at the next index in the array. It does this until all the even numbers are on the right sof the array.
Posted 17 Dec 2012Well, here is the link that explains your problem />
LOL that was actually posted by me yesterday around the same time I posted it here. But the guy does do a good job of explaining it.
Posted 1 Nov 2012Wow, I looked that code over at least 10 times. Thank you guys, i'll make sure to post the error output next time.
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
- Website URL:
helpme18 hasn't added any friends yet.