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.
No random tests (must also generate cases below)
Missing fixed, sample tests for valid cases below:
########## ext. # (3-digit
areacode
+ 3-digitlocal3
+ 4-digitlast4
+ extension)-->
aF[}2654871290D~]:gF;X012345
Above case with leading
1
-->wV: 15754437619At,xfD90
(Note:1575
with leading1
)1(###) ###-#### (
1
followed immediately by 3-digitareacode
+ 3-digitlocal3
+ 4-digitlast4
)-->
a1234-567AbCd8901~:)SD
(###) ####### ext. # (3-digit
areacode
+ 7-digit combined (3-digitlocal3
+ 4-digitlast4
) + extension)-->
!046f*S;b J2634114 extensio91243445445
Above case with leading
1
-->!1046f*S;b J2634114 extensio91243445445
(Note1046
instead of046
)(###)### #### ext. # (6-digit combined (3-digit
areacode
+ 3-digitlocal3
) + 4-digitlast4
+ extension) -->254780gR]}\~fdn dA1234zyXtdfd01234567
Above case with leading
1
-->1254780gR]}\~fdn dA1234zyXtdfd01234567
(Note1254780
instead of254780
)This comment is hidden because it contains spoiler information about the solution
A string also has a length property. Don't need to convert the string to an array with
split()
.substr is deprecated
This comment is hidden because it contains spoiler information about the solution
Diagonal lines are tested, but the line drawing algorithm is not specified. There are at least several possible line drawing algorithms.
This comment is hidden because it contains spoiler information about the solution
Does this kata require any specific node.js functionality?
Good code, but unnecessarily big.
No need to use Math.ceil (if you don't use decimal numbers) and ternary operator.
Check my solution.
Thanks! Mine was so ugly compared to this.
Should explicitly mention that coordinates given will always be valid
Should also mention that points constituting towards diagonal or not fully-straight lines will be tested
Node 18. and chai assertions should be used
Otherwise, a good kata!
This comment is hidden because it contains spoiler information about the solution
Great solution! This is a good way for finding the middle value for sure. I will incorporate this into my code in the future!
Clever indeed
This comment is hidden because it contains spoiler information about the solution
Loading more items...