Problem
Implement Wordle's guess scoring. Given a secret word and a guess of the same length, return a per-position result of green (right letter, right spot), yellow (letter present elsewhere), or grey (letter not present), handling duplicate letters correctly.
Input / Output
guess and secret.Constraints
Example
scoreGuess("allol", "hello") -> greens where letters align, yellows only for surplus letters still available, greys otherwise.scoreGuess("speed", "abcde") -> the two 'e's cannot both be yellow if the secret has only one 'e' left after greens.