Algorithm · Meta · Hard
You are to complete four independent coding tasks, each described below. Task 1: Validate a Numeric Literal You are given a string s. After stripping any leading and trailing whitespace, determine whether the entire remaining string represents a valid decimal number according to the grammar below. Return true if it does, otherwise false. The grammar rules are: An optional sign — either + or -. Followed by exactly one of these three patterns: One or more digits, optionally…
Checking your access…