Search Engine Indexer

Medium
#dicts #strings

Input: `s` (str). Return: Dict mapping words to their frequency. Fundamental for search algorithms.

Example

Input: 'a b a'
Output: {'a': 2, 'b': 1}
Need a hint?
  • Split string into words, then count them
Run your code to see output