Skip to content

Universal implementation #4

@ByteBenderPro

Description

@ByteBenderPro

The following implementation is universal and does not case about string sizes. This should be used.

bool is_isogram(const char phrase[]){
    for(int i = 0; phrase[i] != '\0'; i++) {
        for(int c = 0; phrase[c] != '\0'; c++) {
            if ((toLowerCase(phrase[i]) == toLowerCase(phrase[c])) && (c != i) && isChar(phrase[i])) {
                return false;
            }
        }
    }
    return true;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions