Simple Fun #215: Properly Closed Bracket Word
PreviousExclamation marks series #3: Remove all exclamation marks from sentence except at the endNextBit Plane Return
Last updated
Was this helpful?
Last updated
Was this helpful?
return false remainder is 1 of (input)length divide 2
slice half(begin to middle) of array for optimizing
repeat through 'some()' for optimizing
if process-2 array[i] - 97 is 0 input words[words.length - 1 - i] must 26. repeat this process till not match.
if everything is match 'some()' will return false which means everything is counter value('a' <->'z') so return true via '!(not)' operator
if something is not counter value 'some()' will return true and stop repeating immeadiatly, and we return false via '!(not)' operator