Given a string S, the task is to create a string with the first letter of every word in the string.
Input: S = "geeks for geeks" Output: gfg
Input: S = "bad is good" Output: big
You don't need to read input or print anything. Your task is to complete the function
firstAlphabet() which takes string S as input parameter and returns a string that contains the first letter of every word in S.
Expected Time Complexity: O(|S|)
Expected Auxiliary Space: O(|S|)
1 <= |S| <= 105
S contains lower case English alphabets
Words have a single space between them.