6 kyu
Infected Zeroes
282marbiru
Loading description...
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Nice kata to practice dynamic programming and efficient algorithms with.
This comment has been hidden.
Not 6kyu Kata 100%
New Python test framework
approved.
Python: Argument name clashes with built-in type (
list
).corrected
Am I going crazy or are my revisions not saving correctly? (Not mutually exclusive I suppose...)
might be possible, because the internal soluiton wasn't inside the wrapper. I changed it at the same time.
So you'd better check what's left of your previous changes... :s
Is the argument guaranteed to contain a
0
?Yes, I will add that to description -- thanks!
That was quick. Thanks
Python works, javascript not (part of a python function as initial code, wrong tests?)...
SO: I didn't intend to write in JS at all but accidentally forgot to switch before writing the very first lines of code. Now I can't seem to delete that JS remnant -- do you happen to know how I can do that? Maybe I'm missing something obvious, I'm not sure
ahhhh ok I found it, js should be completely deleted now.
Sorry about this, I'm having a bad night with this kata -- thanks for bearing with me
Don't know... simply translate it to JS;-) Ah, ok resolved;-)
I'm raising this because it's already approvable, but if you add the suggestion below, the ranking could be higher, so jsut in case, to let you a some time to decide what you wanna do.
have added the suggestion below -- brute force should no longer work. Thanks for flagging it for me before approving, much appreciated.
I think it would be good if you had even bigger lists such as ones with 1000 - 10000 items in to stop brute force approaches, as my brute force approach completes all the tests quickly.
good idea, yes.
Note : for this type of cases, use
test.expect
without message (or without displaying the lists, at least)Done. I retried both of your solutions with the new tests and Avanta your one now times out, but Blind4Basics yours runs in 445ms -- is that reasonable? (I went with 99-100k item lists because, well, the power was intoxicating....)
errr, not mine, smile67's one ;)
Haha, nice :)
It makes no sense to change the complexity of a kata after it's solved and ranked... You should think about it before publishing a kata and not behind...
This comment has been hidden.
This comment has been hidden.
Yes I'm sorry I think I misunderstood how the cheat-proofing was meant to work -- I'm getting now that it's not about stopping people from somehow being able to see my solution, it's about stopping them from being able to call my solution, is that right? Probably obvious that I don't really understand how the cheating on here works at all
This comment has been hidden.
Yeah, thats right :P
Nvm, B4B just replied :P
You shouldn't use
list
as the argument name for the function, as it is a built-in function. Something likelst
would be better.ah, good to know! will change
Avanta, I'm surprised you didn't talk about the other point... (see above ;) )
Well, I haven't completed this kata yet so I can't see your comment xD
Sorry guys, this was sloppy of me. Resolved all issues you raised
Example tests please :-)
I set the below tests up
but when I try and submit it is expecting [0,1,1,0] = 2
huh, strange -- let me check.
I thought I posted example tests but I guess I forgot, my bad!
resolved, I believe? Let me know if not
that said, I can't figure out where the
expected [0,1,1,0] = 2
could be coming frmom -- let me know if that's still happeningSorry, thats my bad. No issue with that just me being stupid :-)
It seems like there are still no sample tests. Are you sure they're there?
I was sure... but I was also wrong. This time I think they're there for real -- sorry for taking up your guys' time with this.
Yep, they're there :)