1. Check if given grid is a valid sudoku solution. 2. Use given string as substitution cipher to encode a message. 3. Given a list of random words and numeric strings, return all possible words represented by each numeric string. Example - for words = ["AA", "A", "AB", "AC", "ABC"] and nums = [11, 12, 123] return the map { 11 -> A, AA // because A can be either number 1 or 11 12 -> A, AB, AC // A is 12 OR (A is 1 and B is 2) OR .. 123 -> AB, AC, ABC // (A is 12 and B is 3) OR (A is 1, B is 2, C is 3) OR .. }
Anonymous
Made simple mistakes that I corrected after running the code a few times
Check out your Company Bowl for anonymous work chats.