Posts

Showing posts with the label character count array

Count frequency of character in string C program

Simple C program to count frequency of each character in a string. If string a "programmingside" then frequency of characters:

Count Common characters in two strings

Given two strings, count total number of common characters. For example if two strings are "coder" and "side" then common characters are 2 ( 'd' and 'e' ). If strings are "Programming" and "Side" then common character is 'i'. If strings are "aabbcc" and "aabcc" then common characters are 5 ( 2'a', 1'b', 2'c' ).