7 kyu
Find The Duplicated Number in a Consecutive Unsorted List
1,880 of 9,560jdwolford
Loading description...
Arrays
Algorithms
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.
why golang not exist
because a translation for go has not been submitted / approved
not all kata are automatically available in all languages
C++ Translation.
CoffeeScript translation
Approved
Scala translation
Approved
python new test frame work
Approved
Java translation
This comment has been hidden.
Bad kata and bad description, the test cases do not take into account non-consecutive inputs and the input is an array and not a list as stated in the statement title.
nice kata!
Ruby 3.0 should be enabled.
Enabled in this fork
sometimes things are simpler than they seem
how to handle exception when array is [1, 2, 4, 5, 5]
A good light kata.
Added more tests (a set of random ones). I hope @jdwolford be ok with it. Sorry if I overstepped here, the number of js solutions was reaching the point where the tests become blocked.
I'm sorry, I can't get what you mean. What do you mean by "blocked"?
This comment has been hidden.
This comment has been hidden.
R translation kumited.
Please carefully review and approve! Comments included to help you grok R, if you're not familiar with it. Basic and example tests taken directly from python version. Random tests use the same parameters, but a slightly different structure.
.
As others have pointed out. There is no guidence on what should be returned if the input is invalid. -1 maybe? Would have made the Kata more interesting. If there is no guidance or it doesn't test for it, why even mention it.
Exactly
The description should be clearer about invalid input. Is it, that we can expect only ever to get valid input, or should we somehow react on an invalid input array? From my passing the tests without dealing with invalid input, I would expect the former. Only the instructions should say so.
This comment has been hidden.
Are we assuming only valid input or do we need to code for invalid values eg. [5,4,2,1,1] - would make the challenge mnore interesting if say we needed to return say -1 for invalid inputs.
Typo - dupliated should be duplicated :)
Thanks! Got it fixed.
Nice beginner kata: I translated it into both Python and Ruby, if you want to approve them :)
And let me know if you might appreciate random tests on JS too :)
Thanks got them approved.
I don't feel like random testing is needed, but I certinaly would not mind adding it. :)