Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You are ignoring the overlapse. For example the ex.1 Has 1-5 and 1-5. if you were to write every number between the both of them you would indeed get 9 numbers(length 8), but all of them would be dublicated. So the number of the unique numbers is 5(and the length is 4): 1, 2, 3, 4, 5; it is simpler to understand if you write the intervals on one line in a pice of paper. :)
.
Approved
thanks a lot
upper bound is excluded in the inputs, so:
Hi there.
sumIntervals( [
[1, 5],
[10, 20],
[1, 6],
[16, 19],
[5, 11]
] ) => 19
could you help me?
I dont understand how to parse it, what are arrays overlapping.
The
ISSUE
label is for provable kata issues. Please use theQUESTION
label when asking for help. See https://docs.codewars.com/training/troubleshooting#post-discourse.Refer to the kata's description.
Hi there.
I dont understand
1 test has to equal 8
2 test has to equal 8
3 test has to equal 100_000_040. For example {-4, 1}: 1 - (- 4) = 5 :> -4, -3, -2, -1, 0, interval is 5,
What do i do wrong?
Golang
It's 10 years old :) Difficulty standards have increased since then.
Hi. =) U're rgiht. That may happen, I am chiting some times. This cata was needed only for my course passing
it is cheat =)
good job
thank you a lot.
I ve done this kata
Hello.
My program has done tests which was wrong
For example wrong test:
Exptected:
{6, 9, 11}
Equal:
{0, 6, 9, 11}
My test has done:
Expect(ArrayDiff([]int{6, 9, 7, 0, 11}, []int{-2, 7, 18, -1, 16, -19, 3, -18, -5})).To(Equal([]int{6, 9, 11})), passed
Expect(ArrayDiff([]int{-18, 9, 13, 1, 6, 13, -5, 17, -4, -10, -10, -1, 3, 12, -4, 10, 0, -15}, {3, 19})).To(Equal([]int{6, 9, 11})), passed
Why?
its amazing, thank you!
Loading more items...