An explanation of common notations of area codes would be nice for us non-Americans :)
I (as French) Agree. A Wikipedia link which would explain supported area codes is definitely missing.
"You can assume the first three digits of a ten-digit number will always be the area code." Hmmm.... too bad there was no explanation applying to telephone numbers with more (or less?) than ten digits.
The problem fails to mention that the area codes should be sorted, and that phone numbers may have country codes.
This isn't about American-style phone numbers, but US-style. Otherwise it would be nice to include other test cases so people would be required to actually parse the country code away. Now it is just a matter of removing a leading 1.
I thought I would document my regex, as it looks fairly complex at first glance.
Apparently the order needs to be the same as that defined by the test suite; which is not in the order of the phone numbers given :(
Is there a way to execute regexp/regexprep with multiple expresssions at the same time?
regexp hack
Not sure what's going on here, but it works in my actual MATLAB program, and Octave.
Remove any row in which a NaN appears
6827 Solvers
What is the distance from point P(x,y) to the line Ax + By + C = 0?
277 Solvers
Change the sign of even index entries of the reversed vector
296 Solvers
Create an index-powered vector
352 Solvers
509 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!