I thought there was a standard loophole about cryptographic things, but I didn't see it on re-reading the post. In particular it is trivial to create an answer to this cops and robbers question that requires reversing a hash to crack
Floor Planner! ascii-art code-golf kolmogorov-complexity
Disclaimer: The story told within this question is entirely fictional, and invented solely for the purpose of providing an intro.
I have a friend who is an architect, and, after explaining the concept of code-golf and this site to h...
I have added that the shortest one wins. Plus I have the code gulf tag. What else should I do to clarify how to convert it from LISP to JSON? I have given an example how to escape the sequences that are necessary.
Efficient Robot Movement code-golf string
My boss has gotten a new toy robot, and he wants me to help program it. He wants to be able to enter simple arrow instructions to get it to move. These instructions are: ^ (for move forward) < (for turn left), and > (for turn right). However, now that...
anyone pls i need a character for charcoal for all/every and any/some
@Mr.Xcoder Yeah Charcoal doesn't have any room in its codepage to spare for things like factor :P (although I should probably add more arithmetic builtins soon it's not very high priority)
There should be an interpreter called ~brainfuck that naturally interprets as many variants of BF as possible, without you telling it what you're giving it
Not really? Just find a challenge where Charcoal would do badly I guess? Or just post two snippets that do anything (I'd probably need to restrict it in this case)
@HyperNeutrino it isn't going to make much of a difference at all
Given an array a that contains only numbers in the range from 1 to a.length, find the first duplicate number for which the second occurrence has the minimal index. In other words, if there are more than 1 duplicated numbers, return the number for which the second occurrence has a smaller index th...
Python 3, 88 bytes
O(n) time and O(1) extra memory.
def f(a):
for i in range(len(a)):
if a[a[i]-1]<0:return-~i
a[a[i]-1]*=-1
return -1
Try it online!
Source of the algorithm.
Explanation
The basic idea of the algorithm is to run through each element from left to right, keep track o...
:39125717 def f(a):
a = [None] + a
for i in range(1, len(a)):
if a[i]==0: continue
start = i
while a[i]:
i2 = a[i]
a[i] = 0
i = i2
if i != start:
return i
return -1
Well that was interesting, the reply identifier got itself code-formatted.
@LeakyNun Your solution is cheating because it uses integers 1 bit larger than the input.
We have lots of horizontal axis for numbers, but I honestly think they're kind of boring. Your task today is to build me a portion of a diagonal axis between two distinct non-negative integers given as input.
How to build a diagonal axis?
Let's take an example, with the input 0, 5. Our axis sh...
In class we were given a problem to solve and implement in java, and I still cant wrap my head around it.
There is a set of 24 squares, where each side of every square has a border of either blue, red or green. Every possible permutation is allowed.
I've been trying to use for loops to outp...
One was a four way conversation of me constantly saying I need files x, y and z. Then them going okay heres file x. So I'm having to repeat with I need files y and z etc. etc.
@wizzwizz4 No they just couldn't be bothered to do it properly, they never can be. What annoys me more is that they are IT support for their company and we've told them 100's of times what files we need when they report an issue.
It's not the techy part that annoys me, it's the lack of common sense. And the usual "HELP WE NEEDZ IT NOWWWW!!!!!!" but we'll take 3 days to give you all the information you need.
@TheLethalCoder Have you tried a web wizard that lets them submit a ticket if they upload the correct files (and does simple validation on those files to make sure they haven't uploaded the same one three times or something similar)?
@wizzwizz4 Oh I have thought about that. Problem is we only have 10 people in the company with a team of 3 developers (me included) that do support, programming, lead etc. And we're always busy on new projects that we never have time for in house things like that.
@wizzwizz4 No I know it shouldn't be hard. Half of these companies are sensitive about how they send stuff. So when they upload to FTP it's actually their own one server that we connect too.
We use Jira for development tracking, and ZenDesk for both internal and external supoprt. It's great because we just have a hypervisor monitoring our support email and automatically screening and converting relevant emails to ZenDesk tickets
if they call in with something that isn't "Our system is down, help" we tell them to make a ticket