{"type":"code-showcase","description":"Code showcase examples","schema":{"additionalProperties":false,"type":"object","properties":{"title":{"maxLength":80,"type":"string"},"language":{"default":"python","maxLength":30,"type":"string"},"author":{"default":"Code Examples","maxLength":60,"type":"string"},"handle":{"default":"@codeexamples","maxLength":60,"type":"string"},"samples":{"default":[{"title":"Binary Search","code":"def binary_search(arr, target):\n    left, right = 0, len(arr) - 1\n\n    while left <= right:\n        mid = (left + right) // 2\n\n        if arr[mid] == target:\n            return mid\n        elif arr[mid] < target:\n            left = mid + 1\n        else:\n            right = mid - 1\n\n    return -1","explanation":"Binary search divides the search space in half with each iteration, achieving O(log n) time complexity."},{"title":"List Comprehension","code":"# Standard approach\nnumbers = [1, 2, 3, 4, 5]\nsquares = []\nfor n in numbers:\n    squares.append(n ** 2)\n\n# List comprehension\nsquares = [n ** 2 for n in numbers]","explanation":"List comprehensions provide a concise way to create lists. The highlighted line shows the Pythonic one-liner equivalent.","highlightLines":[8]}],"minItems":1,"maxItems":8,"type":"array","items":{"additionalProperties":false,"type":"object","required":["title","code"],"properties":{"title":{"maxLength":80,"type":"string"},"code":{"maxLength":4000,"type":"string"},"explanation":{"maxLength":400,"type":"string"},"highlightLines":{"maxItems":50,"uniqueItems":true,"type":"array","items":{"minimum":1,"maximum":200,"type":"integer"}}}}}}}}