Company: Autodesk_30sep
Difficulty: medium
Count Same Letter Words You are building a tool for authors that studies their writing patterns. One of its checks looks at the shape of individual words. A text is given to you as a list of n words made of English letters. A word is balanced when its first letter and its last letter are the same letter, ignoring case - so a matches both a and A . A word of a single letter is balanced, because its first and last letter are that one letter. Count how many of the n words are balanced. Input Format The first line contains a single integer n - the number of words in the text. The second line contains the n words, separated by single spaces. When n is 0 this line is empty. (inferred -- the source passes the whole text to solution(text) as one string; this two-line layout with the word count first is the one the provided code reads.) Output Format Print a single integer - the number of balanced words. Constraints 0 <= n <= 90000 Every word is 1 to 1000 characters long and contains only