You're exploring a mysterious grid filled with ancient symbols, and you possess a set of unique symbols that you seek within this grid. Your mission is to devise a method to search for these symbols amidst the labyrinth of characters. However, there are rules to follow:
Your task is to calculate the number of times you encounter these symbols within the grid, following these strict guidelines.
P.S. For original prompt, pls refer to source image π
Examples
01 Β· Example 1
phrases = ["ac", "cat", "car", "bar", "acdc", "abacaba"] grid = [["a", "b", "a", "c"], ["x", "a", "c", "d"], ["y", "r", "d", "s"]] return = 7
Unfortunately, we don't have the access to the video mentioned in the example image π₯Ή
Constraints
Uknown for nowMore Meta problems
- Merge Three Sorted ArraysPHONE SCREEN Β· Seen May 2026
- Highest Rating Price RatioOA Β· Seen Mar 2026
- Diagonal Traverse (for E4 ;)PHONE SCREEN Β· Seen Mar 2025
- Find Peak ElementPHONE SCREEN Β· Seen Mar 2025
- Find Pair Closest to K (for E5 :)PHONE SCREEN Β· Seen Feb 2025
- Get Minimum Round Trip Cost (: for E4 && E5 :)PHONE SCREEN Β· Seen Feb 2025
- Max Consecutive Ones III (for E5 :)PHONE SCREEN Β· Seen Feb 2025
- Nested List Weight Sum (for E4)PHONE SCREEN Β· Seen Feb 2025
public int searchMysteriousGrid(String[] phrases, String[][] grid) {
// write your code here
}
phrases["ac", "cat", "car", "bar", "acdc", "abacaba"]
grid[["a", "b", "a", "c"], ["x", "a", "c", "d"], ["y", "r", "d", "s"]]
expected7
checking account