User blog comment:QuasarBooster/Bashicu matrix version 4 in Python!/@comment-35470197-20191109233117/@comment-24923514-20191110001915

Aren't all ancestors of an entry less than that entry (besides the entry itself)? It find a parent, you could scan to the left until you find a lesser value, then check above it to see if that entry is an ancestor. You could do so by, again, checking if the one value is less than the other value and, again, checking if the above entry is an ancestor, etc. Once you're at the top row, you just have to check if the one entry is less than the other. Would that not work to find the parent of an entry?