Présentation du problème

Anagram


Check whether two strings are anagrams.

medium
Generate Goal Tree Build Plan

Goal Tree Generated by LLM

{
  "children": [
    {
      "children": [
        {
          "children": [],
          "goal": "Convert both strings to lowercase"
        }
      ],
      "goal": "Normalize strings for comparison"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Count occurrences of each character in both strings"
        }
      ],
      "goal": "Analyze character frequencies"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Check if frequency maps are identical"
        }
      ],
      "goal": "Compare frequency distributions"
    }
  ],
  "goal": "Determine if two strings are anagrams"
}
    

Generated Goals

Mixed goals generated by the LLM (correct + distractors).

  • Check if both strings are palindromes
  • Normalize strings for comparison
  • Convert both strings to lowercase
  • Analyze character frequencies
  • Ensure that both strings contain only alphabetic characters
  • Count occurrences of each character in both strings
  • Check if frequency maps are identical
  • Verify that both strings have the same length
  • Compare frequency distributions