LeetCode: Second Largest Digit in a String
Problem:
https://leetcode.com/problems/second-largest-digit-in-a-string/
Code:
class Solution:
def secondHighest(self, s: str) -> int:
dgts = set()
for ch in s:
if ch.isdigit():
dgts.add(int(ch))
...
is-power-of-two.hashnode.dev2 min read