# Algorithm TypeScript Test Suite
# Algorithm implementation challenges

tests:
  - name: "fibonacci"
    language: "typescript"
    prompt: |
      Write a TypeScript function that calculates the nth Fibonacci number.
      Calculate and print the 10th Fibonacci number (0-indexed, so fib(10)).
    expected: "55"
  
  - name: "factorial"
    language: "typescript"
    prompt: |
      Write a TypeScript function that calculates the factorial of a number.
      Calculate and print factorial(5).
    expected: "120"
  
  - name: "palindrome_check"
    language: "typescript"
    prompt: |
      Write a TypeScript function that checks if a string is a palindrome.
      Test it with "racecar" and print "true" if it is a palindrome.
    expected: "true"
  
  - name: "prime_check"
    language: "typescript"
    prompt: |
      Write a TypeScript function that checks if a number is prime.
      Test it with 17 and print "true" if it is prime.
    expected: "true"
  
  - name: "bubble_sort"
    language: "typescript"
    prompt: |
      Write a TypeScript function that implements bubble sort.
      Sort [64, 34, 25, 12, 22, 11, 90] and print the sorted array joined by commas.
    expected: "11,12,22,25,34,64,90"
  
  - name: "binary_search"
    language: "typescript"
    prompt: |
      Write a TypeScript function that implements binary search.
      Search for 7 in [1, 3, 5, 7, 9, 11] and print the index.
    expected: "3"
  
  - name: "reverse_string"
    language: "typescript"
    prompt: |
      Write a TypeScript function that reverses a string without using built-in reverse.
      Reverse "hello" and print the result.
    expected: "olleh"
  
  - name: "sum_of_primes"
    language: "typescript"
    prompt: |
      Write TypeScript code that calculates the sum of all prime numbers up to 20.
      Print the result.
    expected: "77"
