{
  "api": "sorting-algorithms",
  "title": "Sorting Algorithms",
  "description": "Well-known comparison and non-comparison sorting algorithms with their complexity and stability.",
  "emoji": "🔣",
  "license": "GPL-2.0-or-later",
  "count": 16,
  "self": "https://gratisapi.com/api/sorting-algorithms/index",
  "endpoints": {
    "list": "https://gratisapi.com/api/sorting-algorithms/index",
    "item": "https://gratisapi.com/api/sorting-algorithms/{id}"
  },
  "fields": [
    "average_case",
    "best_case",
    "id",
    "name",
    "space_complexity",
    "stable",
    "worst_case"
  ],
  "results": [
    {
      "id": "bubble-sort",
      "name": "Bubble Sort",
      "best_case": "O(n)",
      "average_case": "O(n^2)",
      "worst_case": "O(n^2)",
      "space_complexity": "O(1)",
      "stable": true,
      "url": "https://gratisapi.com/api/sorting-algorithms/bubble-sort"
    },
    {
      "id": "insertion-sort",
      "name": "Insertion Sort",
      "best_case": "O(n)",
      "average_case": "O(n^2)",
      "worst_case": "O(n^2)",
      "space_complexity": "O(1)",
      "stable": true,
      "url": "https://gratisapi.com/api/sorting-algorithms/insertion-sort"
    },
    {
      "id": "selection-sort",
      "name": "Selection Sort",
      "best_case": "O(n^2)",
      "average_case": "O(n^2)",
      "worst_case": "O(n^2)",
      "space_complexity": "O(1)",
      "stable": false,
      "url": "https://gratisapi.com/api/sorting-algorithms/selection-sort"
    },
    {
      "id": "merge-sort",
      "name": "Merge Sort",
      "best_case": "O(n log n)",
      "average_case": "O(n log n)",
      "worst_case": "O(n log n)",
      "space_complexity": "O(n)",
      "stable": true,
      "url": "https://gratisapi.com/api/sorting-algorithms/merge-sort"
    },
    {
      "id": "quick-sort",
      "name": "Quick Sort",
      "best_case": "O(n log n)",
      "average_case": "O(n log n)",
      "worst_case": "O(n^2)",
      "space_complexity": "O(log n)",
      "stable": false,
      "url": "https://gratisapi.com/api/sorting-algorithms/quick-sort"
    },
    {
      "id": "heap-sort",
      "name": "Heap Sort",
      "best_case": "O(n log n)",
      "average_case": "O(n log n)",
      "worst_case": "O(n log n)",
      "space_complexity": "O(1)",
      "stable": false,
      "url": "https://gratisapi.com/api/sorting-algorithms/heap-sort"
    },
    {
      "id": "shell-sort",
      "name": "Shell Sort",
      "best_case": "O(n log n)",
      "average_case": "O(n^1.5)",
      "worst_case": "O(n^2)",
      "space_complexity": "O(1)",
      "stable": false,
      "url": "https://gratisapi.com/api/sorting-algorithms/shell-sort"
    },
    {
      "id": "counting-sort",
      "name": "Counting Sort",
      "best_case": "O(n + k)",
      "average_case": "O(n + k)",
      "worst_case": "O(n + k)",
      "space_complexity": "O(n + k)",
      "stable": true,
      "url": "https://gratisapi.com/api/sorting-algorithms/counting-sort"
    },
    {
      "id": "radix-sort",
      "name": "Radix Sort",
      "best_case": "O(nk)",
      "average_case": "O(nk)",
      "worst_case": "O(nk)",
      "space_complexity": "O(n + k)",
      "stable": true,
      "url": "https://gratisapi.com/api/sorting-algorithms/radix-sort"
    },
    {
      "id": "bucket-sort",
      "name": "Bucket Sort",
      "best_case": "O(n + k)",
      "average_case": "O(n + k)",
      "worst_case": "O(n^2)",
      "space_complexity": "O(n + k)",
      "stable": true,
      "url": "https://gratisapi.com/api/sorting-algorithms/bucket-sort"
    },
    {
      "id": "tim-sort",
      "name": "Tim Sort",
      "best_case": "O(n)",
      "average_case": "O(n log n)",
      "worst_case": "O(n log n)",
      "space_complexity": "O(n)",
      "stable": true,
      "url": "https://gratisapi.com/api/sorting-algorithms/tim-sort"
    },
    {
      "id": "cocktail-sort",
      "name": "Cocktail Shaker Sort",
      "best_case": "O(n)",
      "average_case": "O(n^2)",
      "worst_case": "O(n^2)",
      "space_complexity": "O(1)",
      "stable": true,
      "url": "https://gratisapi.com/api/sorting-algorithms/cocktail-sort"
    },
    {
      "id": "gnome-sort",
      "name": "Gnome Sort",
      "best_case": "O(n)",
      "average_case": "O(n^2)",
      "worst_case": "O(n^2)",
      "space_complexity": "O(1)",
      "stable": true,
      "url": "https://gratisapi.com/api/sorting-algorithms/gnome-sort"
    },
    {
      "id": "comb-sort",
      "name": "Comb Sort",
      "best_case": "O(n log n)",
      "average_case": "O(n^2)",
      "worst_case": "O(n^2)",
      "space_complexity": "O(1)",
      "stable": false,
      "url": "https://gratisapi.com/api/sorting-algorithms/comb-sort"
    },
    {
      "id": "cycle-sort",
      "name": "Cycle Sort",
      "best_case": "O(n^2)",
      "average_case": "O(n^2)",
      "worst_case": "O(n^2)",
      "space_complexity": "O(1)",
      "stable": false,
      "url": "https://gratisapi.com/api/sorting-algorithms/cycle-sort"
    },
    {
      "id": "intro-sort",
      "name": "Intro Sort",
      "best_case": "O(n log n)",
      "average_case": "O(n log n)",
      "worst_case": "O(n log n)",
      "space_complexity": "O(log n)",
      "stable": false,
      "url": "https://gratisapi.com/api/sorting-algorithms/intro-sort"
    }
  ]
}
