@ConorO'Brien I think it might be better to split functional operator and operator functions into two seperate proposal so to increase the chance at least one will get in :P
I think there's a condition you can use for a recursive solution in that there is no observable effect of throwing less than the minimal number of balls, so you can throw that number into every chute and recurse on the resulting configuration
that sounds like a combinatoric explosion though, unless there's some dynamic programming substructure
Play a game of Flow
Flow Free is a game where you have to join different coloured points on a board with a "pipe", in such a way that no pipes cross and that 100% of the board is covered in pipes. Your task is to take an empty Flow board and output the solution to it. Each board is guaranteed on...
@PeterTaylor by the way you might want to implement some anti-bruteforce clause into your challenge or else I'm sure someone will iterate over every permutation of chutes and every possible ballthrowing strategy
Groovy, 27 bytes
f={it<3?it:f(it-2)-f(it-1)}
Try it online!
Okay, so I feel like I stumbled upon a great language for golfing. This code is basically what most other answers are doing, if n is lesser than 3, then return n or else return f(n - 2) - f(n - 1). But there are a few cool things abo...
My guess new is that people read it, thought it would be easy, did it assuming the time limit would be a non-issue and then realized how hard it was to make a valid answer given the constraint. I feel that the issue of it being a chameleon challenge is mostly that the time constraint is the most important aspect of the challenge but is not stressed as so in the body of your question.
Make me some ASCII cities!
Your job is to pseudo randomly generate ASCII cities (top down view) with n building per row with x rows. Each house should have a number label starting with 000 and working up. First number is the row (assume x<9) and the other two are places in the row. i.e 000, 001,...
I was looking at the new APIs introduced in Android 4.2.
While looking at the UserManager class I came across the following method:
public boolean isUserAGoat()
Used to determine whether the user making this call is subject to teleportations.
Returns whether the user making this call ...
Your job is to pseudo randomly generate ASCII cities (top down view) with n building per row with x rows. Each house should have a number label starting with 000 and working up. First number is the row (assume x<9) and the other two are places in the row. i.e 000, 001, 002... Every house should v...
@Zacharý Why don't you have a Cap like J? It will push a special null value causing the next dyad to act as a monad, thus giving you a host of available monadic functions, each (possibly) related to its dyadic cousin?
I've just tried golfing my Python solution and got 152 bytes with no need for lrucache, but it took me several hours of refining my ideas to get to that algorithm
@Adám 🛰️ is currently supposed to reflect part of the code on another part of it, when the code is wrapped around an elliptic surface, based on some solar and lunar calculations.
You are to write a program that takes a list of strings as input. For every string in the list you are to determine the smallest N such that no other string in the list begins with the same N characters as the string in question. Now compose a new list with all these strings. Here is an exampl...
@orlp I don't think so. As mentioned in the sandbox post, it's an anonymised version of a question which seems to be from an Amazon interview a couple of years ago, but I could find barely anything using the phrasing of the Amazon version
@Zacharý No. They didn't know how Dan would fare. Also, they did cheat. They got results which looked correct, but were character vectors instead of numeric arrays. That was against the spec from the beginning.
@Uriel He wasn't Dan-ish, he was just Dan. Daniel, actually. His family always called him Daniel. He did live in Denmark though, and learned some Danish.
His wife and daughter visited me in London a couple of days ago. And today we looked at an old bug report that Dan had filed, and needed to ask what exactly he meant. Miss him. ⊥⍨
Make your language mostly unusable
cops-and-robbers arithmetic
Inspired by this comment...
In this challenge, you are tasked with running some code that makes it so that your language no longer satisfies our criteria of being a programming language. In that challenge, that means making it so...