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.
can any one explain the third example in problem description code
queueTime([2,3,10], 2)
// should return 12
I didn't get it, how it return 12 plz explain
oh! right, thankyou so much, how did I miss that 🤦♂️
why no?
solution([-10, -9, -8, -6, -3, -2, -1, 0, 1, 3, 4, 5, 7, 8, 9, 10, 11, 14, 15, 17, 18, 19, 20])
this should return
returns "-10--8,-6,-3--1,3-5,7-11,14,15,17-20"
but returns returns "-10--8,-6,-3-1,3-5,7-11,14,15,17-20"
the -3--1
is just given -3-1
instead of saying just no , could you explain?
This comment is hidden because it contains spoiler information about the solution
actually my code is lot longer and more basic looking than this one, but took less time to execute, just saying.
but I like the use of libraries too, but we can't predict some times if it can be efficent
I don't know about that, In the end short and efficent code matters and he got that, so I think its alright
there is slight error in example given in question
the example shows
-3-2 in the substring, but it is actually
-3--2
yes shortest is not the best, but the code that executes the fastest is the best and this code is the least time taken to execute, so yeah,its the best ;)
what the hell is this! , sorry I didn't understand a single bit.
this is just an answer framing 🤦♂️