Skip to content

Universal implementation #4

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;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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