Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
560 B
3
Indexable
Never
rows = ["qwertyuiop", "asdfghjkl", "zxcvbnm"]
    
    FOR EACH s IN arr
        lowercaseS = TO_LOWERCASE(s)
        found = FALSE
        
        FOR EACH row IN rows
            canTypeInRow = TRUE
            
            FOR EACH c IN lowercaseS
                IF INDEX_OF(c, row) == -1
                    canTypeInRow = FALSE
                    BREAK
            
            IF canTypeInRow == TRUE
                found = TRUE
                BREAK
        
        IF found == TRUE
            ADD s TO res
    
    RETURN res