![]() |
Honestly, I don't think the code you just gave me will come through a compiler... ;)
But he probably used something like this: i=0; j=word.length-1; flag = false; do { if (word.charAt(i) == word.charAt(j)) { flag = true; } else { flag = false; break; } i++; j--; } while (i<=j); if (flag) { palindrome found... } else { palindrome not found... } This way the code will be like 40-45% faster, but it's harder to write... Again, check the API for correct syntaxis/methods... Chrs! Ronald |
[QUOTE=neal_672]:wave:[/QUOTE]
:wave: How are things? |
[QUOTE=kili]Not really :lol:
Just like.. not knowing a thing :p What's up everyone?[/QUOTE] Doin fine... thanx... you? I got better, after being sick the last few days, so I went to school 2day... Played loads, and wrote some new songs... So everything seems to be going quite allright... |
Not too shabby apart from the whole exams thing, how about you?
|
Oh just relaxing.. I have exams coming up :smoke:
Finishing havo this year.. van 5 vwo naar 5 havo, maar dat is een lang verhaal. Hou het maar op luiheid. I am not playing a lot of bass lately, but if you are near dordrecht.. come and check my band out in the Highschool Music Competition Finale :) |
Vertel... wanneer, waar (Bibelot??), hoe laat, hoe duur, etc...
(BTW... [email]r_mansveld@hotmail.com[/email] (alleen MSN) is misschien handiger...) |
Huh?
|
Hooray!!!
I took the code, made the necessary changes, and it works! Hooray!!! Thank ya kind sire! |
[QUOTE=PaulSimonon]Huh?[/QUOTE]
Yeah sorry, was a little Dutch 'entre nous'... (To speak with rush...:)) |
[QUOTE=Spaceman Spiff]Hooray!!!
I took the code, made the necessary changes, and it works! Hooray!!! Thank ya kind sire![/QUOTE] That would be $25.- than please... ;) No, you're welcome... sbeen a pleasure... |
What does the
flag = false and flag = true mean? |
[QUOTE=bassi3]Yeah sorry, was a little Dutch 'entre nous'... (To speak with rush...:))[/QUOTE]
It was! And it was about the dutch school system and a gig that I have to play nearby :thumb: So nothing to worry about =) No secret poŽn sites/bass improvements were told :naughty: |
[QUOTE=Spaceman Spiff]What does the
flag = false and flag = true mean?[/QUOTE] flag is just variable to hold the state of the palindrome. Because were checking character by character, instread of the complete word, we need a way to remember whether the chars we checked so far were part of a palindrome. That's what flag is used for. We initially say that flag is false, because we assume there ain't a palindrome, till the opposite is proven. Then we will check both the first and the last letter, when these are the same, we have a palindrome SO FAR. So, we have to change the flag to true. The flag will stay true, till either the end of the do..while loop, or till a non-matching char is found, in which case the flag will be set to false. Then the break-statement is called, to break us out of the do...while loop, cause the word won't be a palindrome NEway... All we have to do in the end, is check the flag-state, to know whether we dealt with a palindrome or not... That's it. |
[QUOTE=Spaceman Spiff]What does the
flag = false and flag = true mean?[/QUOTE] flag is just variable to hold the state of the palindrome. Because were checking character by character, instread of the complete word, we need a way to remember whether the chars we checked so far were part of a palindrome. That's what flag is used for. We initially say that flag is false, because we assume there ain't a palindrome, till the opposite is proven. Then we will check both the first and the last letter, when these are the same, we have a palindrome SO FAR. So, we have to change the flag to true. The flag will stay true, till either the end of the do..while loop, or till a non-matching char is found, in which case the flag will be set to false. Then the break-statement is called, to break us out of the do...while loop, cause the word won't be a palindrome NEway... All we have to do in the end, is check the flag-state, to know whether we dealt with a palindrome or not... That's it. |
[QUOTE=kili]No secret poŽn sites were told :naughty:[/QUOTE]
Yeah, like we would discuss po(r)n-sites... :amaze: :naughty: :p /edit: with that i mean NEbody discussing that with [U]me[/U] |
[QUOTE=kili]wang chung?
Tell me.. wtf is that :lol:[/QUOTE] honestly i have no idea but come on.........wang-chung that just screams bad a$$ |
So Ct, who hears is hungry?
|
[QUOTE=ScorpSath]So Ct, who hears is hungry?[/QUOTE]
*raises hand* |
Peoples, I'm off, i have to get the train to school in like 7 hours, and i still need to get some sleep...
So Kili, sorry, but our Dutch influence is upon your shoulders for now... Cheers, and c y'all 2morrow! BTW. left shoe, thnx! There are some terrific songs made by those bands! |
[QUOTE=bassi3]Peoples, I'm off, i have to get the train to school in like 7 hours, and i still need to get some sleep...
So Kili, sorry, but our Dutch influence is upon your shoulders for now... Cheers, and c y'all 2morrow! BTW. left shoe, thnx! There are some terrific songs made by those bands![/QUOTE] :wave: |
Hey.
|
Im off to bed now, ive got my ICT exam tomorrow! yey...
Farewell (I emailed that video of the real bad singer singing slipknot to Ebaums world :lol: ) |
[QUOTE=bassi3]So Kili, sorry, but our Dutch influence is upon your shoulders for now...
[/QUOTE] I am also out of here :D So the Dutch people are leaving.. Don't make a mess of the place ;) :wave: |
[QUOTE=kili]I am also out of here :D
So the Dutch people are leaving.. Don't make a mess of the place ;) :wave:[/QUOTE] so long kili and remember.........wang-chung |
Would anyone happen to have an mp3 of School Days they'd be willing to send me/upload somewhere for downloading?
|
So... Guess who just bought tickets to the Stones tour?
|
Meh.
I'm not a big enough fan to go see them live. |
^^ Nice.
They are even coming here! |
[QUOTE=Spaceman Spiff]Would anyone happen to have an mp3 of School Days they'd be willing to send me/upload somewhere for downloading?[/QUOTE]
[URL=http://s25.yousendit.com/d.aspx?id=3Q073AMQ8CCXC31P9D8X88C6W5]yes[/URL] |
Why thank you, thank you very much.
|
| All times are GMT -6. The time now is 12:00 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.