INNER CODE UNIT · Java
col
robinhood/ticker · ticker/src/main/java/com/robinhood/ticker/LevenshteinUtils.java:189
int col = numCols - 1;
while (row > 0 || col > 0) {
if (row == 0) {
// At the top row, can only move left, meaning insert column
resultList.add(ACTION_INSERT);
col--;
} else if (col == 0) {
// At the left column, can only move up, meaning delete column
resultList.add(ACTION_DELETE);
row--;
} else {
final int insert = matrix[row][col-1];
final int delete = matrix[row-1][col];
final int replace = matrix[row-1][col-1];
if (insert < delete && insert < replace) {
resultList.add(ACTION_INSERT);
col--;