loading...

re: Help me with the code, most of the test cases passed but when a negative number encounter it return its positive value. VIEW POST

FULL DISCUSSION
 

Also I assume you're doing this as a learning excercise, as there are easier ways of doing this if you're just looking for a utility function?

 

Yes as a beginner I am learning the stuff.

 

See my other comment for guidance. If you can't figure it out after a few hours of playing with regex, message me and I'll send you the pattern.

code of conduct - report abuse