CMC: given a strictly increasing non-negative integer sequence, substitute the middle parts of consecutive numbers with …. E.g. 1 3 4 5 8 9 10 11 12 13 15 → 1 3…5 8…13 15`. Whitespace is fine.
Who Won the Chess Game?
Bear with me, this is incredibly bare-bones at the moment; I'll work on this over-time, just wanted to gauge interest on the over-all idea.
Given an input list of moves l, output who won the chess game given that white always goes first, alternating moves from there. U...
Your program should take an array as input.
The array:
Will always be 1 dimensional
Will only contain integers
Can be empty
The program should reverse the array, and then add up the elements to the original for example:
Input: [1,2,3]
[1,2,3]
[3,2,1]
[1+3,2+2,3+1]
Output: [4,4,4]
Te...
It seems like we don't see many puzzles on this site, and the attempts at puzzles are generally ill-taken. How would the name
'Programming Competitions and Code Golf'
fit the community vs
'Programming Puzzles and Code Golf'?
@tuskiomi before the challenge was deleted, I was going to add that the tag wiki for programming-puzzles describes something very different from that challenge anyway, so it would probably be off topic regardless.
I agree it was clearly a deliberate riddle rather than programming help though
I don't like the answer being downvoted and deleted while there was still disagreement over whether the challenge was on topic. That doesn't seem like a valid reason for deletion.
I think it was clearly well intended, not a lazy request for help, and it would have been nice to have had time to link to Puzzling where it would have been on topic
I hope this kind of "riddle" is ontopic in Programming Puzzles & Code Golf.
Give an example of a situation where the C# method below returns false:
public class Giraffe : Animal
{
public bool Test()
{
return this is Giraffe;
}
}
Rules: The code lines above must not be changed in any...
I can't say for certain what the intention was, I just would have liked to have been able to say "if you intended this as a riddle, you can post it on puzzling instead", which would have been possible had it been closed but not immediately deleted
Not quite. The first is "here's some code; figure out how to make it behave a certain way". The newer one, in my opinion, is more like "I have some code and it's supposed to do something but it does something else; why?"