Présentation du problème

Array Average


Calculate the average of the elements in an array.

easy
Generate Goal Tree Build Plan

Goal Tree Generated by LLM

{
  "children": [
    {
      "children": [
        {
          "children": [],
          "goal": "Add all elements together"
        }
      ],
      "goal": "Determine the total sum of the numbers"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Identify the array length"
        }
      ],
      "goal": "Count the number of elements"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Divide the sum by the count"
        }
      ],
      "goal": "Calculate the average value"
    }
  ],
  "goal": "Compute the average of a list of numbers"
}
    

Generated Goals

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

  • Sort the array in ascending order
  • Count the number of elements
  • Determine the total sum of the numbers
  • Identify the maximum element in the array
  • Compute the median of the array
  • Calculate the average value
  • Divide the sum by the count
  • Identify the array length
  • Add all elements together