A text analysis tool needs to report the most frequent words in a piece of text.
You are given a string text that contains English letters and spaces, where words are separated by spaces. Count every word in a case-insensitive way, then return the words that belong to the highest-frequency groups along with their frequency. You need to return an array that applies the rules below:
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected