I'll gladly let you have all the set theory and epsilon-delta
Announcement
Collapse
No announcement yet.
what's the 5 letter word with the most one-word anagrams?
Collapse
X
-
I particularly liked how instead of writing something that counted +1 every time it found a match instead I wrote to a temp file and grep -c for 1s in that temp file.
12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
Comment
-
I'm lazy and copy-paste is way too easy.12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
Comment
-
It took me ~45 seconds to write that function. Thinking would have cost extra time.12-17-10 Mohamed Bouazizi NEVER FORGET
Stadtluft Macht Frei
Killing it is the new killing it
Ultima Ratio Regum
Comment
-
You could cut down the number of permutation that need to be checked by atleast an order of magnitude by forcing two of the letters to be vowels.Companions the creator seeks, not corpses, not herds and believers. Fellow creators, the creator seeks - those who write new values on new tablets. Companions the creator seeks, and fellow harvesters; for everything about him is ripe for the harvest. - Thus spoke Zarathustra, Fredrick Nietzsche
Comment
-
Originally posted by Kuciwalker
We wrote that program correctly in my sophomore year of HS
"I hope I get to punch you in the face one day" - MRT144, Imran Siddiqui
'I'm fairly certain that a ban on me punching you in the face is not a "right" worth respecting." - loinburger
Comment
-
Originally posted by Kuciwalker
Code:int rvdn(int n, char* string, int stringlen) { for(int i = 0; i < stringlen; i++) for(int j = i; j < stringlen; j++) if(string[i] == string[j]) return 0; return 1; }
Code:rvdn str = (sort str) == (nub $ sort str)
Yes, it isn't as fast to run. But it sure is easy to look at the line and think "hm, this checks if the given list (strings are lists of char in Haskell), sorted, is the same as the same given list, sorted, and with sequences of duplicate elements collapsed... so, in other words, it checks for whether there are any duplicate elements in a list."This is Shireroth, and Giant Squid will brutally murder me if I ever remove this link from my signature | In the end it won't be love that saves us, it will be mathematics | So many people have this concept of God the Avenger. I see God as the ultimate sense of humor -- SlowwHand
Comment
-
Originally posted by Impaler[WrG]
You could cut down the number of permutation that need to be checked by atleast an order of magnitude by forcing two of the letters to be vowels.
Originally posted by Kuciwalker
Anyway, it's easier to detect bugs in mine than his, since his could be missing a line and you wouldn't notice.This is Shireroth, and Giant Squid will brutally murder me if I ever remove this link from my signature | In the end it won't be love that saves us, it will be mathematics | So many people have this concept of God the Avenger. I see God as the ultimate sense of humor -- SlowwHand
Comment
-
Code:rvdn :: (Eq a) => [a] -> Bool -- to keep the monomorphism restriction from biting you rvdn = any (\x -> (head x) `elem` (tail x)) . init . tails
- it can deal with types for which equality is defined but order isn't, that is, you can pass it stuff like complex numbers
- it can deal with some limited cases of infinite lists and lists with undefined elements that the sorting version couldn't
- it probably performs a bit better than the earlier version
- it'spointlesspoints-freeLast edited by Ari Rahikkala; December 1, 2006, 21:39.This is Shireroth, and Giant Squid will brutally murder me if I ever remove this link from my signature | In the end it won't be love that saves us, it will be mathematics | So many people have this concept of God the Avenger. I see God as the ultimate sense of humor -- SlowwHand
Comment
Comment