Quantcast
Channel: User Yay295 - Code Golf Stack Exchange
Browsing latest articles
Browse All 12 View Live

Comment by Yay295 on List of possible birth years of living humans

@innovati: That prints the same year over and over. If you replace the last '120' with 'i' as I expect you meant, it's still in the wrong order.

View Article


Comment by Yay295 on List of possible birth years of living humans

char*v[] -> char**v saves 1 byte. You can save another by delimiting your years with a space or a comma instead of a newline.

View Article


Comment by Yay295 on List of possible birth years of living humans

@Neil: Thanks. My original solution used an array, but I hadn't thought to remove it.

View Article

Comment by Yay295 on Quick Golf: The Gold Leader

save 2 bytes $.get("www.medalbot.com/api/v1/medals",a=>alert(a[0][c='coun‌​try_name']+'\n'+a[1]‌​[c]+'\n'+a[2][c]))

View Article

Comment by Yay295 on Tips for Golfing in ECMAScript 6 and above

35 bytes f=n=>eval("for(o=i=0;i<n;)o+=++i")

View Article


Comment by Yay295 on All in all it's just, uh, another trick in code golf

for(i=1;i<w*h;++i) -> for(i=0;++i<w*h;) saves 1

View Article

Comment by Yay295 on All in all it's just, uh, another trick in code golf

@Neil: Good idea, but I thought of something better.

View Article

Comment by Yay295 on Calculate the difficulty of a Code Golf question

@DomHastings: Yes, though slice would be even shorter.

View Article


Comment by Yay295 on Calculate the difficulty of a Code Golf question

@ConorO'Brien: Good point!

View Article


Answer by Yay295 for Count of "a"s and "b"s must be equal. Did you get it...

JavaScript, 34 bytess=>(s=s.match`^a(.*)b$`[1])?f(s):1In true automata fashion, this function returns 1 if it's true, and fails if it's not.f=s=>(s=s.match`^a(.*)b$`[1])?f(s):1let test_strings =...

View Article

Answer by Yay295 for Array Escape - get out of there

JavaScript, 121 132...

View Article

Answer by Yay295 for Integers, Assemble!

JavaScript, 284259245241240223209 205 bytes// Golfedlet f = (N,W,H)=>eval('a=Array(H).fill("");while(N)g:{s=""+N--;d=s[L="length"];for(i in a)if(a[i][L]+d<=W){a[i]+=s;break...

View Article
Browsing latest articles
Browse All 12 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>