Jump to content

Recommended Posts

get palindrome to testcount i from 0 to (palindrome.length()/2 - 1)- if palindrome.charAt(i) != palindrome.charAt(stringlength-i) then set fail flag and exit loop.output results.
or jsut tye it back and forthyeahhiyw
Link to post
Share on other sites
  • Replies 6.4k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

You guys take your TOP's very seriously.

get palindrome to testcount i from 0 to (palindrome.length()/2 - 1)- if palindrome.charAt(i) != palindrome.charAt(stringlength-i) then set fail flag and exit loop.output results.
Hmmm. I was thinking something likeString s = racecar;int i;boolean test = truefor(i=0; i<s.legnth; i++){if(s.charAt(i) == s.charAt(s.length - 1 - i){}else{test = false;}}what do I print?
Link to post
Share on other sites
Hmmm. I was thinking something likeString s = racecar;int i;boolean test = truefor(i=0; i<s.legnth; i++){if(s.charAt(i) == s.charAt(s.length - 1 - i){}else{test = false;}}System.out.println(test);would this work? I know it's not pseudocode, but whatev.
for(i=0; i<s.legnth; i++){ this doubles the number of comparisons you need. once you get to the middle of the string & everything has matched to that point, you know it is a palindrome. ie: you compare 0=7 1=6 2=5 3=4 4=3 5=2 6=1 7=0 -- four of these are repeat comparisons; my cutting the count in half, palindrome.length()/2 - 1, compares 0=7 1=6 2=5 3=4 and then stops.
Link to post
Share on other sites
for(i=0; i<s.legnth; i++){ this doubles the number of comparisons you need. once you get to the middle of the string & everything has matched to that point, you know it is a palindrome. ie: you compare 0=7 1=6 2=5 3=4 4=3 5=2 6=1 7=0 -- four of these are repeat comparisons; my cutting the count in half, palindrome.length()/2 - 1, compares 0=7 1=6 2=5 3=4 and then stops.
Ah, thank you very much sir.I'm guessing for a print statement, it would be:if(test == true){System.out.print("It's a palindrome");}else{System.out.print("It's not a palindrome");}
Link to post
Share on other sites

9 times out of 10, I'm not going to finish this damn paper by 11am. I've been wrestling as to whether or not to drop this class for a few weeks now. I hate my life right now.

Link to post
Share on other sites

On page 30 right now. Good God, I need to comment on a lot of stuff.

:club:
What's worse is my game is just as bad drunk as it is sober.Maybe I need Ecstasy.
after 4 years of wearing boxers...I am trying out boxer briefs.....I must say...I feel right.
I thought only gay people wore those...
who'd you have to blow to get that discount?
That was my first reaction, but I passed up on it.
You suck.
QFT
Chicago Uno's is different than any other.
I'm finding I'm QFT'ing custom a ton.
Chicago is it's own state and is not part of the real Illinois.
According to iowa's finest: yes.
Oh and as for HLA at parties (mentioned early and got my attention): There has never been an fcp army party that did not have this.
Why didn't I join the army?
Well, I do like my pizza with a side of flogging.
Only you could say that and not get me weirded out.
So do I! Everything goes better with flogging!
I retract the above statement.
Link to post
Share on other sites
mother of god....This thread is so out of control, lol..My net's down at home, Direct TV went out today as well (tree fell and gave my dish a bad beat), so I actually..Read a book today. omg."More Twisted" short story anthology by Jeffery Deaver. It's a whole ton of suspense short stories.. It's well worth the effort, and the stories are only 30 pages each.. I haven't been this excited about a book since the Borderlands Anthology.I'm a total short story junkie, fwiw.
I really need to start reading again. You know, something other than poker books.
She seriously can't. She got banned and had to promise not to post girls kissing pics ever again to get back. I, however, have never (yet) been banned.IMG_0949.jpg
i love you.
no B-Dub's in WA?
if that's true, I'm going to cry.
fizzled yo pizzle
your opinion no longer counts IMO.
I don't even know what this b-dub's you speak of is?
See above * 1000I'm also crying.
Um, I'll be back in 10 minutes.
QFT
This could be the greatest thread ever.
FYP
Ok, one more...sample1.jpg
This page is officially bookmarked.
that's not the only thing
QFT
Link to post
Share on other sites

Congrats Kuge.In other news, I'm withdrawing from my class tomorrow. That will make this a 9 credit semester. There's no way I pass this science class without losing my mind.

Link to post
Share on other sites
That one did it... I just glued my underpants to my fur.
That's something I could've went without hearing...ever.
4-lesbians-kissing.jpgNo one else sees nip right.....good.....
What is this nip you speak of?
man, am I glad I thought of nikki's old lesbian kiss posts.
Your nostalgia has made you my hero.
Hang's currently hiding under his bed, I think... You've triggered flashbacks.. Damn you!
ROFLMAOShe looks feisty and easy on the eye. She can bite me anytime.
83271690_ae1dcef4e1.jpghot_lesbian_kiss.jpg
Did you get lost going to your pornstar thread?Not that I'm complaining, not one bit. :club:
c'mon that's a great showthree-lesbians-kissing-outside-video-01.jpg
OMG
So THIS is where the party is at.
This has become that, yes.Actually, was it never not considered a party?
Hi Happy. I'm Avi.
This deserved e-val.
The Greeeeaaattt Bammmmmmbiiiiiinooooo!!You're Killin me smallsetc
I like it. It sticks.
I need a change of pants immediately.. :icon_clap:Vinyl, red hair, and a lollipop? Sweet zombie jeebus.
Dude, how many changes of pants do you go through at work?
Link to post
Share on other sites
The Calizza's were the shit, but those are LONG gone.
QFT
I've gotta say, I'm very impressed by the legs this thread is showing. 13-14 pages in a day is quite impressive, nice show all.Who would have thought the Armies, Sickies, Hideout(ies), and Couchies could all play nicely together?
I certainly didn't. This thread grew legs faster than I thought it wouldBut I love the way this thread has fused together with posters from every superthread jumping in.
What if I told you j-web IS my wife? :club:
BAHAHAHAHAHAHAHAHAHAHAHA
Well, gg, hang! better luck next time, 4th is still groovy.
It is groovy, but still a drag. Consider I was still arguably the best razz player on at the table, especially after scotty busted, and definitely felt like I was going to take it down.Such a shame the donk on my left 4-handed can't fold weak unimproved eights.Oh well, good to be back at a final table.
Link to post
Share on other sites
Congrats Kuge.In other news, I'm withdrawing from my class tomorrow. That will make this a 9 credit semester. There's no way I pass this science class without losing my mind.
Yeah, if it's stressing you out, drop, take it with another professor next year (if possible). If that's even the problem.I hate science FWIW.
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements


×
×
  • Create New...