Code File Header
Do you have a large number of source files that you forgot to put a header on, but never bothered. Well then this challenge is for you!
This is code golf, so shortest program that works wins.
The Challenge
Write a function (if your language doesn't support this, write a progra...
Introduction
You are a roboticist designing the next generation of modular robots that self configure into various configurations, modeled after how birds fly together. You need to design the most efficient algorithm for switching all your robots from one configuration to another.
Limitation...
@deostroll Hello, and welcome to the Programming Puzzles and Code Golf chat! Are you looking for general programming help? If so, you might want to ask a question on Stack Overflow.
Hey, uhhh... when you see an answer like this. please flag it as offensive/abusive (it's not spam, it just links to Yahoo) instead of deleting!
Those flags have special properties that make moderating these situations much easier. (Also, 6 of them auto-delete a post and deduct the poster's rep by 100.)
(@xnor @aditsu @MartinBüttner, not trying to call you out or anything, but just a request. Thanks!)
Consider a set of N objects, one of which we will call K. Count the number of possible sequences where each element in the sequence is contained in the set, adjacent items in the sequence are different, and the first and last element cannot be K
I'm having trouble solving that problem. Specifically the last requirement (that the first and last element can't be K)
Random distribution in array with exact number of occurences and max size
Write a program or a function, that takes 3 inputs x y z, where :
x is an integer representing the max size of each output array.
y is an integer representing the exact number of occurence of each z value.
z is a set of ...
@PeterTaylor That seems quite prohibitive. I'm sure there must be a lot esolangs which provide some sort of randomisation but no information about the PRNG being used.
Ok, I have another programming puzzle. You are given a set of pairs (X, Y). You need to pick a sequence such that both values in the pair are at least 1 bigger than the previous pair's values. In other words, if S(n) = (a, b), and S(n-1) = (c,d), then a < c and b < d. Your goal is to find the longest sequence
At most chili cookoffs I've been to, there's a bunch of mediocre, one or two good/great, and then one that some asshole decided to make the spiciest thing in the world, just because :P
The asian market in Austin scared me though. I'd ask for sushi grade salmon and they would just nod their heads and grab something and if I asked if it was sushi grade they would just smile and keep nodding.
There's not much you can do except find a place you trust, to be honest. A lot of groceries (esp small ones) don't have the space or inclination to handle the fish completely separately to avoid cross-contamination. They just don't do enough volume to make it worth it.
The bright side is, the likelihood of getting seriously sick is often overstated.
Yea, it might be harder to word it than show it. Stupid words.
If you want to make it a bit more complex, give another input for CW/CCW. (I only thought of this because your spiral looks backwards to me for no good reason)
@MartinBüttner: So what's the point if I have to open a bounty on a question basically saying: "to win this, you've to comply to the specifications of this other question"?
@DavidOngaro Well no, that's not what I meant. If you put a bounty on the other question, you'll get answers using the ASCII format specified there. But I believe that such an answer should be possible to adapt without much trouble.
Even so, I'm sure there are a hundred different ways to render a 7-segment display display in ASCII art, and it wouldn't really add anything new to the site to have another question for each of them. I realise that this is unfortunate in your situation, but I'm afraid this is what our current policies on duplicates are like. (Which isn't stopping anyone from casting reopen votes, though.)