Présentation du problème

Character Occurrences


Count the number of occurrences of a character in a string.

easy
Generate Goal Tree Build Plan

Goal Tree Generated by LLM

{
  "children": [
    {
      "children": [
        {
          "children": [],
          "goal": "Confirm the character to be counted"
        }
      ],
      "goal": "Understand the target character"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Determine the string length and composition"
        }
      ],
      "goal": "Examine the string content"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Specify how to identify matches and tally them"
        }
      ],
      "goal": "Develop a counting plan"
    }
  ],
  "goal": "Count the number of occurrences of a specified character in a string"
}
    

Generated Goals

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

  • Understand the target character
  • Identify the first occurrence of the target character.
  • Check if the string contains only alphabetic characters.
  • Determine the string length and composition
  • Examine the string content
  • Confirm the character to be counted
  • Determine the length of the string.
  • Develop a counting plan
  • Specify how to identify matches and tally them