• Welcome to Valhalla Legends Archive.
 

Re:Palindrome Detection

Started by Mephisto, May 11, 2004, 08:47 AM

Previous topic - Next topic

Mephisto

I hope whoever cares doesn't take Storm's code seriously.  :)

Tuberload

Quote from: Mephisto on May 14, 2004, 08:26 PM
I hope whoever cares doesn't take Storm's code seriously.  :)

Scheme is a programming language...
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Mephisto

Yes, but this is C/C++, not scheme.  I seriously doubt he cared about an answer in scheme.  :p

Tuberload

Quote from: Mephisto on May 14, 2004, 09:15 PM
Yes, but this is C/C++, not scheme.  I seriously doubt he cared about an answer in scheme.  :p

That was not my point. For people that truly care, maybe they should take his code seriously... A discussion can be spawned from a question. That discussion does not necessarily have to stick with the initial question.

Programming is an art, and a language is a tool.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Mephisto

#19
*shrug*

I think you're missing the point of a C/C++ programming forum.  The one who started the initial question didn't want the code in Scheme, and if they did I'd be suprised.  Storm randomly (and probably joking around) posted some code in Scheme.  I doubt the one who asked the question would care, especially since they posted this in the C/C++ programming forum, and wanted a C/C++ answer.  Who the hell cares about an answer in Scheme at this point?  Jeesh...

Tuberload

#20
Quote from: Mephisto on May 14, 2004, 09:42 PM
*shrug*

I think you're missing the point of a C/C++ programming forum.  The one who started the initial question didn't want the code in Scheme, and if they did I'd be suprised.  Storm randomly (and probably joking around) posted some code in Scheme.  I doubt the one who asked the question would care, especially since they posted this in the C/C++ programming forum, and wanted a C/C++ answer.  Who the hell cares about an answer in Scheme at this point?  Jeesh...

Do you even read what is said to you before you reply?
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Mephisto

*shrug*

Must you have to try and argue that someone should really take Storm's code into account when this is a C/C++ board, with a C/C++ question, expecting C/C++ answers and not code from another language?  Jeesh...

vile

Good job, Meph. Your last reply stopped everyone from helping you.

Tuberload

Quote from: Mephisto on May 14, 2004, 10:40 PM
*shrug*

Must you have to try and argue that someone should really take Storm's code into account when this is a C/C++ board, with a C/C++ question, expecting C/C++ answers and not code from another language?  Jeesh...

I was not attempting to argue with you, I was trying to get a very subtle message acrossed...
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Adron

Quote from: Mephisto on May 14, 2004, 10:40 PM
*shrug*

Must you have to try and argue that someone should really take Storm's code into account when this is a C/C++ board, with a C/C++ question, expecting C/C++ answers and not code from another language?  Jeesh...

As we have previously concluded that this is some kind of homework question, and that we shouldn't provide direct "paste this code into your program" answers to those, what's wrong with his answer?

I like Storm's code. It's one of the "pseudo-code" category answers, except that his code happens to be working in a different language.

Besides, if you want there to be an easier to use answer, you could provide that yourself. This is a really easy question, anyone with some C++ programming experience should be able to write such a program (not one suitable for handing in, but one that works) in 5 minutes. If you want to give the user what he "expects", by all means, go ahead, do it. Don't complain at others who choose to give hints only.



Banana fanna fo fanna

fine...

- for each character 1..n/2 indexed by i in an n-length string s...
- check whether s == s[n-i]
- logical AND with the next character test

Arta

heh, it's lamda calculus.. that's kinda neat :)