Présentation du problème

Reverse a String


Write an algorithm that reverses a string.

easy
Generate Goal Tree Build Plan

Goal Tree Generated by LLM

{
  "children": [
    {
      "children": [
        {
          "children": [],
          "goal": "Determine the length of the string"
        },
        {
          "children": [],
          "goal": "Identify character positions"
        }
      ],
      "goal": "Analyze the input string"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Define mapping from original to reversed positions"
        }
      ],
      "goal": "Plan the reversal process"
    }
  ],
  "goal": "Reverse a string"
}
    

Generated Goals

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

  • Explore the historical development of string manipulation algorithms
  • Identify character positions
  • Analyze the input string
  • Analyze the role of string reversal in cryptographic applications
  • Define mapping from original to reversed positions
  • Determine the length of the string
  • Investigate the impact of string reversal on computational complexity
  • Plan the reversal process