« first day  last day (14 days later) » 

03:36
@JoshuaCrotts
You remembered the problem with [2, 23, 32]?
90165154163178122120223469255924714414217133180235248861911553923913714120434117‌​572402074135210114119232221055326194652461791723617097662031831317451581136714311‌​801074587195438219731311523514098546116129229112785784255631242
12109742089256162911328018816712716060243411424110423816220218791382011261344717‌​621452331851111011151147103194820620512519619020506922249214018476149521461002373‌​017523421512311193106221151212251589518218624521915719818119916989771391021481716‌​216614521396378123621644224249244230941081567213638202331896415915375271161641297‌​321717328832113188932289971209623118168681771922427015020024226101878481511101301‌​2822712232
This testcase has two solutions (23 and 32).
One more problem: On which computer are the programs measured? Even TIO is not acceptable: codegolf.meta.stackexchange.com/questions/12707/…
@ColeraSu Which test case? You sent 2 messages with ~8 lines.
@user202729 Concatenate two strings into one string. The testcase is too long to send in one message.
Well, I guess I was incorrect. Since those are edge cases, account for them! Haha
How should programs handle those cases?
[0,1,3..22,24..31,34..39,23,2] missing number: 32
[0,1,3..22,24..31,34..39,2,32] missing number: 23
both have the same representation as a string
For simplicity, just print "MULTIPLE SOLUTIONS" for the case.
I'd rather just find any solution if it's ok with you?
03:59
So... in case if there is exactly one solution, print the number; if there is multiple solutions, print the string "MULTIPLE SOLUTIONS".
Either is acceptable. I'm not gonna be strict since I screwed up and didn't account for it.
If you wanna print A*** solution, it's fine, or you can print MULTIPLE.
Like, "MULTIPLE SOLUTIONS".
or go with what the current answers do, so not to trip them
i think that would be fair, if they work in these cases
FYI the main problem with unclear question is OP may later edit the question, invalidate existing answers.
I'm not gonna edit the question.
I have two working solutions that work for all cases except multiple solution ones, so it's fine.
You can just say "it is guaranteed that there is only 1 solution".
04:02
yes, that's good too ^
What do you mean?
btw, nice question, @JoshuaCrotts!
Thanks, haha. Anyone have a Big O time for this? Or an ESTIMATE?
Big O relative to which variable?
4
Q: The Missing Number Revised

Joshua CrottsBackground: I originally posted this question last night, and received backlash on its vagueness. I have since consulted many personnel concerning not only the wording of the problem, but also its complexity (which is not O(1)). This programming problem is an evil spin on an Amazon interview que...

^ Question link for reference
@JoshuaCrotts it means that all test cases that are expected to be solved will have only one solution. The ones with multiple solutions don't apply.
04:07
@user202729 on the... entire algorithm?
Do you understand what is Big O complexity?
BigO relative to the range or the string length. They're almost linear to each other, so it's almost the same, except in different number of digits
Let's pick the max-flow Edmond-Karp algorithm for example.
It's asymptotic complexity is IIRC O(V * E^2)
Which is, because the algorithm can handle arbitrarily large (unbounded) V and E.
I believe my solution was O(n^2)
(V = number of vertices, E = number of edges)
@JoshuaCrotts In your problem there are no parameter which can be arbitrarily large, so it doesn't apply.
The string length is strictly less than 250*3.
04:09
@user202729 I figured Big O applied to any algorithm.
Be warned: I am NOT too familiar with advanced algorithms and the works.
But with respect to which variable? You are not answering what I'm asking. I'm talking about variable and you're talking about algorithm...
Respect to the size of the range I assumed.
I was assuming a general algorithm that would solve this for any range. That makes bigO posible
In this case we all use only [0, 249)
04:11
Brandon, it's [0, 250)
Yee
My bad haha
04:31
The point stands, though, that you can’t use big O when all the variables are fixed at constants like 250. Sorting a list of N elements: O(N log N). Sorting a list of 250 elements: O(1).

« first day  last day (14 days later) »