Given a string A = Hello world and another string B = wor, I have to print (TRUE or FALSE) whether the characters in B are present in A. For example, if B = ollw l the result should be TRUE; if B = worlds the result should be FALSE; if B = ww, result is FALSE. It has to be done in O(n) time complexity.My solution is given below. Although this runs in O(n) time I would like some suggestions on how to improve.int main(void){        char *A = Hello world;        char *B = ollw l;        int table['z'] = {0};        while (*A != '\0') {                table[*A] += 1;                A++;        }        while (*B != '\0') {                table[*B] -= 1;                if (table[*B] < 0) {                        printf(%s\n, FALSE);                        return 0;                }                B++;        }        printf(%s\n, TRUE);}
Homework / toy program - character matching
algorithm;c;strings;homework