[48in24 Exercise] [07-23] Anagram

This issue is a discussion for contributors to collaborate in getting ready to be featured in 48in24. Please refer to this forum topic for more info.


We will be featuring Anagram from Jul 23 onwards.

Staff jobs

These are things for Erik/Jeremy to do:

  • ☐ Check/update exercise in Problem Specifications
  • ☐ Create + schedule video

Community jobs

For each track:

  • Implement Anagram
  • Add approaches (and an approaches introduction!) for each idiomatic or interesting/educational approach.
  • Add video walkthroughs (record yourself solving and digging deeper into the exercise).
  • Highlight up to 16 different featured exercises (coming soon)

Existing Approaches

You can use these as the basis for approaches on your own tracks. Feel free to copy/paste/reuse/rewrite/etc as you see fit! Maybe ask ChatGPT to translate to your programming language.

  • case-insensitive-sorting (go)
  • frequency-counter (go)

Track Statuses

You can see an overview of which tracks have implemented the exercise at the #48in24 implementation status page.

I’ve currently gathered the following solutions to feature:

  1. CoffeeScript: convert string to chars, sort, then back to string
    Convert the string to chars, sort, then back to string. Mention not all languages compare arrays

  2. Julia: convert string to chars then sort, use function composition
    Convert string to chars then sort, use function composition

  3. AWK: sort string via global setting
    Set sort setting to ascending, then creating new string via char append gives sorted string

  4. Haskell: sort string, which is a list of chars
    No need to convert string to chars, as it already is a list

  5. Pharo: convert to sorted string
    Convert the string to a sorted string and compare

  6. Prolog: check if candidate is permutation
    Check if the candidate is a permutation of the input

  7. Python: check if letter counts are equal
    Check if the letter counts are equal

If anyone has more suggestions, do let us know!

I’ll try to implement it in COBOL.

1 Like

Implemented in COBOL:

1 Like

Oops, I thought D already had this one. I’ll implement it.

1 Like

Sync tests for Clojure

1 Like

Adding for MIPS

1 Like

Small fix:

1 Like
1 Like