Mphasis interview question

char occurance in string leetcode problem