Search Results
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 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
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 |
For challenges with a restriction placed on the amount of memory that can be allocated. This can be through direct limits (e.g. 64 bytes) or through big-O-notation (e.g. O(n log(n))).
10
votes
Accepted
Finding duplicate balls in a basket?
Python - 17 chars
Solely as an expression:
min(B,key=B.count)
Full, standalone program with input and output, 34 chars:
B=input()
print min(B,key=B.count)
edit: What gnibbler said.
3
votes
Count up forever
dc, 12 bytes
Uses an "anonymous" recursive macro, should be able to run for ever:
z[r1+prdx]dx
8
votes
Count up forever
Ruby, 15 12 bytes
loop{p$.+=1}
p, when given an integer, prints the integer as-is (courtesy of @philomory)
$. is a magical variable holding the number of lines read from stdin. It is obviously ini …