Valid Numeric String

Опубликовано: 29 Декабрь 2023
на канале: Team AlgoDaily
130
3

Try to solve this at https://algodaily.com/challenges/vali...

You are working as a software engineer at a company that develops a financial trading platform. Your team is working on a new feature that allows users to enter numeric strings into a text field and have them parsed and converted into numbers.

One of the requirements for this feature is that the numeric strings must be valid. A valid numeric string must consist of:

A sign character (either `+` or `-`).
One or more digits.
A decimal point `.` followed by one or more digits.
An `e` or `E` followed by an integer.

For example, all the following are valid numeric strings:

```
"+"
"-"
"123"
"-123.456"
"1e10"
"-90E3"
```

while the following are not valid numeric strings:

```
"abc"
"1a"
"1e"
"e3"
"99e2.5"
```

You need to write a function that can be used to determine if a given string is a valid numeric string.


На этой странице сайта вы можете посмотреть видео онлайн Valid Numeric String длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Team AlgoDaily 29 Декабрь 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 130 раз и оно понравилось 3 зрителям. Приятного просмотра!