4 kyu
Fastest Code : Half it IV
Loading description...
Puzzles
Games
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.
Wow, the edge test cases are very well made..
Nice Kata!
As someone pointed out in the comments below, my solution took 3s with keyword let before variables and 12 s without !!
Very strange...
The description is badly formatted.
missing fixed test:
Approved
Maybe the description should clarify cases like
[1,2,3,2,1]
. The result is[1,2]
or[2,1]
?The current kata expects
[1,2]
.This one is too easy for 3kyu I think ;-)
This comment has been hidden.
This comment has been hidden.
maybe local val is quicker than global? I'm not sure...
Strange... ;-) Just tested your solution without "..." - as well it's too slow. PS: Your simpler "3min Half it IV" took more than 3 minutes and the solution was a little bit "confusing" as you can see inside my code;-)... Perhaps next time you can publish 3min, 10min, 15min and fastest code, starting with 4 x 3 points:-)...?!
Well, see my "Coding 300min" later..