We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func exist(_ board: [[Character]], _ word: String) -> Bool { var hashMap: [Character: Int] = [:] var hasMapMatrix: [Character: Int] = [:] for value in Array(word) { hashMap[value, default: 0] += 1 } for col in 0..<board.count { for row in 0..<board[col].count { hasMapMatrix[board[col][row], default: 0] += 1 } } var isExist: Bool = false for char in word { if let countworld = hashMap[char], let countMatrix = hasMapMatrix[char], countworld <= countMatrix { isExist = true } } return isExist }
The text was updated successfully, but these errors were encountered:
update iOS interview questions #3
1c739ba
No branches or pull requests
The text was updated successfully, but these errors were encountered: