leetle

Daily challenge for 2025-06-23

174. Valid Phone Number

Write a function solve that validates if a string is a valid US phone number. Valid formats are:
- (123) 456-7890
- 123-456-7890
- 123.456.7890
- 1234567890

Example:
Input: "(123) 456-7890"
Output: true

Example 2:
Input: "123-45-6789"
Output: false

Run this challenge interactively in Python or JavaScript when the app loads.