Présentation du problème

Remove Duplicates


Remove duplicate elements from a list.

medium
Generate Goal Tree Build Plan

Goal Tree Generated by LLM

{
  "children": [
    {
      "children": [
        {
          "children": [],
          "goal": "Determine element frequencies"
        }
      ],
      "goal": "Identify duplicate occurrences"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Preserve original order"
        },
        {
          "children": [],
          "goal": "Collect unique elements"
        }
      ],
      "goal": "Construct a list of unique elements"
    }
  ],
  "goal": "Remove duplicate elements from a list"
}
    

Generated Goals

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

  • Collect unique elements
  • Determine the frequency of each element in the list
  • Construct a list of unique elements
  • Determine element frequencies
  • Sort the list before removing duplicates
  • Identify duplicate occurrences
  • Preserve original order
  • Check if the list is already unique