Présentation du problème

Binary Search


Perform a binary search in a sorted array.

hard
Generate Goal Tree Build Plan

Goal Tree Generated by LLM

{
  "children": [
    {
      "children": [
        {
          "children": [],
          "goal": "Identify low and high indices"
        }
      ],
      "goal": "Determine search boundaries"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Compare target with middle element"
        }
      ],
      "goal": "Iteratively narrow search space"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Check if target found or report not found"
        }
      ],
      "goal": "Confirm search outcome"
    }
  ],
  "goal": "Perform a binary search in a sorted array"
}
    

Generated Goals

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

  • Compare target with middle element
  • Confirm search outcome
  • Investigate how binary search can be adapted for searching in a linked list.
  • Identify low and high indices
  • Iteratively narrow search space
  • Evaluate the impact of array size on the efficiency of binary search.
  • Check if target found or report not found
  • Determine search boundaries
  • Assess the role of binary search in sorting algorithms.