Search
⌘K

Leetcode 3044. Most Frequent Prime

Given an m x n digit matrix, form numbers by walking from every cell in any of the 8 straight directions (appending digits along the path and considering every prefix) and count those >10 that are prime; return the most frequent prime (tie broken by larger value) or -1 if none.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.