Skip to content

Add approach docs for the Word Count exercise #4275

Description

@Yrahcaz7

A while ago, I worked through the Word Count exercise and found the varied approaches interesting. Now that I have the time, I propose adding approach docs for the following approaches:

  • A manual iteration approach with a variant that uses itertools.chain() for performance
  • A str.maketrans()/str.translate() approach, with variants for manual looping vs collections.Counter
  • A re.split() plus collections.Counter approach
  • A re.findall() approach, either as its own doc or as a variation of the previous one

The iterations of my solution roughly correspond to each approach/variation in this list.

I would be happy to draft up a PR for this after some details are decided upon (such as one unified regex approach doc vs separate re.split() and re.findall() ones).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions