Timeline for Sandbox for Proposed Challenges
Current License: CC BY-SA 3.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 21, 2016 at 10:34 | comment | added | Stewie Griffin |
You can say that the input will not have any special characters except ' and - . Those two must be trimmed away. I think you must include those two, since these can be found in many texts.
|
|
Dec 21, 2016 at 10:31 | history | edited | Olle Kelderman | CC BY-SA 3.0 |
added 3 characters in body
|
Dec 21, 2016 at 10:26 | comment | added | Olle Kelderman | @StewieGriffin those two characters should have been included, look at the list from en.cppreference.com/w/cpp/string/byte/ispunct where I got it from, somehow I messed up the copy-paste :( And about "what is desired behaviour?" Im honestly not sure, I never really thought about it before you mentioned it and then I looked at how my sample program handled it. I remember putting in the ispunct-trim for stuff like commas after a word, im not sure about characters within the word... | |
Dec 21, 2016 at 10:20 | comment | added | Stewie Griffin | PS! I don't mean to be difficult, it's just that in my experience you'll get these questions sooner or later. So it's a good thing to sort it out while it's still in the Sandbox :) | |
Dec 21, 2016 at 10:17 | comment | added | Stewie Griffin |
!"#$%&'()*+,-./:;<=>?@[]^_{|}~ are all the non-alphanumeric ASCII-characters, except \` . I suggest you include the missing two symbols in the list to ignore, and say: "All non-alphanumeric characters (except spaces and newlines) must be trimmed away. So, it's and its are the same word." (You might want to rephrase that since my English isn't perfect, but something along those lines. If this is the rule then R2D2 and dr.22 will be anagrams, I'm not sure if that the desired behavior..?
|
|
Dec 21, 2016 at 7:43 | comment | added | Stewie Griffin | parsing and anagrams are relevant tags, maybe strings too, but I'm not sure about that one. | |
Dec 21, 2016 at 0:05 | comment | added | Olle Kelderman | @StewieGriffin I added a rule about special character handling, but I'm not completely sure about it, thoughts? (see my added "sandbox question") | |
Dec 21, 2016 at 0:04 | history | edited | Olle Kelderman | CC BY-SA 3.0 |
added 1036 characters in body
|
Dec 20, 2016 at 23:48 | comment | added | Olle Kelderman | welp, turns out I handled special characters differently, I strip them away from the word, so "it's" becomes "its", guess that'll be the rule then since I want to keep as close as possible to the original program | |
Dec 20, 2016 at 23:35 | comment | added | Olle Kelderman | @StewieGriffin The grouping thing is a natural result of my solution to the problem back then, and imo its a fun part of the challenge, so I'm not totally sure about removing it. About the memory limit: I'm totally fine with the guarantee of at least one character if you think empty input needs special handling (i didnt think it would, but I dont really care :P) And yes, you are correct about special characters. I'd say "it's" is two words: "it" and "s". All special characters are ignored, so essentially regarded as whitespace between words. I'll add that | |
Dec 20, 2016 at 23:31 | comment | added | Stewie Griffin | You should add rules regarding special characters. Are it's, sit and its anagrams? What about hyphens? Can there be any special characters such as $?() etc? How are they treated? | |
Dec 20, 2016 at 23:29 | comment | added | Stewie Griffin | I think the memory rule is fine. I'm quite sure people will write a script that in theory would work for any input length if it wasn't for language or memory limitations. I also suggest you guarantee at least one character in the input. Otherwise people would need to add code just to handle empty input and that's not the interesting part of the challenge. | |
Dec 20, 2016 at 23:24 | comment | added | Stewie Griffin | I suggest you remove the grouping rule, since it's not really the interesting part of the challenge. It just adds code and limits the solutions. It's apparent which of the words that are together anyway. I do suggest they have to be grouped though, but without the need for delimiters. | |
Dec 19, 2016 at 17:29 | comment | added | Olle Kelderman | @Flp.Tkc yes, like "parts, strap, traps" in the example | |
Dec 19, 2016 at 17:27 | comment | added | FlipTack |
What happens if there are 3 that are anagrams, such as eat ate tea ? Are they all printed in one line / group?
|
|
Dec 18, 2016 at 19:24 | history | answered | Olle Kelderman | CC BY-SA 3.0 |