Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 67046

Code-golf is a competition to solve a particular problem in the fewest bytes of source code. If you want to score by characters instead of bytes, please state this explicitly in the challenge. If source code length is not the primary scoring criterion, consider using another tag instead.

1
vote
Haskell, 274 bytes w is the main function, which has the type [[a]] -> [[a]] that you would expect. I'm sure a more experienced Haskell golfer could improve on this. w m|t m==1=m|0<1=let m'=p m in …
answered Aug 1 '18 by AlexJ136
3
votes
Haskell, 236 bytes f=u 0 0 k _ _ _ _ _ h m[]=z h++':':z m k a b c d e h m(q:s)=case q of{'^'->e(a h)(b m)s;'v'->e(c h)(d m)s;'>'->v h m s;'<'->u h m s} u=k(o(+)24)id(o(-)24)id u v=k id(o(+)60)id(o(-) …
answered Jul 18 '18 by AlexJ136
1
vote
Haskell, 87 bytes A nice recursive solution is possible here: import Data.Char f[]=[] f[c]=[c] f[c,d]=[chr(ord c+div(ord d-ord c)2)] f(c:s)=f$init s
answered Aug 8 '18 by AlexJ136
0
votes
Haskell, 73 bytes f[]a="" f(c:s)a|c==';'=f s(a+1)|c=='#'=toEnum(a`mod`127):f s 0|0<1=f s a
answered Aug 10 '18 by AlexJ136
2
votes
Haskell, 579 530 bytes y=length i=filter u i e l=take i l++[e]++drop(i+1)l k v(r,c)g=u r(u c v(g!!r))g b(r,c)g=g!!r!!c w(r,c)s g=case s of{""->j;'<':t->w(r,c-1)t j;'>':t->w(r,c+1)t j;'v':t->w(r+1,c)t …
answered Mar 18 '17 by AlexJ136
3
votes
Scala, 18 bytes _.sortBy(_.+(1)%2)
answered Jul 18 '18 by AlexJ136
4
votes
Haskell, 3 bytes: odd It's built-in. Works as expected. There is also even but of course that's one byte longer.
answered Mar 22 '17 by AlexJ136
1
vote
C, 128 bytes m,n,p,z;main(c,v)char**v;{m=atoi(v[1]);n=atoi(v[2]);p=atoi(v[3])-2;printf("%d,%d",m,n);while(p--)z=m,m=n,n=z-m,printf(",%d",n);} This program parses the three arguments m, n and p from …
answered Mar 16 '17 by AlexJ136