Back to problems

Word Guess Game Feature

Algorithm · Verkada · Medium

Design and implement a Wordle-style game feature. Your function receives two strings: secret, the target word, and guess, the word being tested. It must return an array describing the status of each guessed letter: GREY (0): The letter does not occur in secret. YELLOW (1): The letter appears in secret, but not at this position. GREEN (2): The letter appears in secret at the same position. For example: Input: secret = "h e l l o", guess = "a b c d e" Output: [0, 0, 0, 0, 1]…

Checking your access…