LeetCodeSecond Largest Digit in a StringSecond Largest Digit in a StringEasyHash TableStringSolution export function secondHighest(s: string): number { return [...new Set(s.replace(/[^0-9]/g, ''))].map((v) => +v).sort((a, b) => b - a)[1] ?? -1; }LeetCodeSecond Largest Digit in a Stringhttps://leetcode.com/problems/second-largest-digit-in-a-string