Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Job manager crashed while running this job (missing heartbeats).
Error code: JobManagerCrashedError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
data_source string | prompt list | ability string | reward_model dict | extra_info dict |
|---|---|---|---|---|
taco | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nProblem\n\nGiven a natural number N less than or equal to... | code | {
"ground_truth": "{\"inputs\": [\"5\", \"4\", \"6\", \"11\", \"8\", \"7\", \"10\", \"9\", \"12\", \"001\", \"010\", \"011\", \"4\", \"6\", \"9\", \"8\", \"10\", \"5\", \"7\", \"11\", \"12\", \"001\", \"010\", \"011\", \"1\", \"3\", \"2\"], \"outputs\": [\"16\\n\", \"6\\n\", \"12\\n\", \"1024\\n\", \"24\\n\", \"64\\n... | {
"index": 0,
"raw_program": "import math\n\ndef count_divisors(n):\n \"\"\"Return the number of divisors of n.\"\"\"\n divisors_count = 0\n for i in range(1, int(math.sqrt(n)) + 1):\n if n % i == 0:\n divisors_count += 2 # i and n/i are divisors\n if i == n // i: # Correct t... |
taco | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nGarry is looking at the sky. Such a beautiful day! He not... | code | {
"ground_truth": "{\"inputs\": [\"1\\n10000 0 10000 10000 0 10000\\n3\\n10000 0 10000 10000 5000 5000\\n5000 5000 10000 10000 0 10000\\n0 0 0 1000 1000 0\\n\", \"2\\n9996 0 9997 0 0 1\\n9999 0 10000 0 0 1\\n2\\n9997 0 9998 0 0 1\\n9998 0 9999 0 0 1\\n\", \"1\\n2 0 2 4 4 2\\n2\\n2 0 2 2 4 2\\n2 2 4 2 2 4\\n\"], \"out... | {
"index": 0,
"raw_program": "from collections import defaultdict\nimport sys\nfrom typing import List, Tuple\n\ndef convex_hull(points: List[Tuple[int, int]]) -> List[Tuple[int, int]]:\n \"\"\"\n Computes the convex hull of a set of points using the Graham scan algorithm.\n \"\"\"\n def cross(o: Tuple[... |
taco | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nGarry is looking at the sky. Such a beautiful day! He not... | code | {
"ground_truth": "{\"inputs\": [\"1\\n10000 0 10000 10000 0 10000\\n3\\n10000 0 10000 10000 5000 5000\\n5000 5000 10000 10000 0 10000\\n0 0 0 1000 1000 0\\n\", \"2\\n9996 0 9997 0 0 1\\n9999 0 10000 0 0 1\\n2\\n9997 0 9998 0 0 1\\n9998 0 9999 0 0 1\\n\", \"1\\n2 0 2 4 4 2\\n2\\n2 0 2 2 4 2\\n2 2 4 2 2 4\\n\"], \"out... | {
"index": 0,
"raw_program": "def find(parent, i):\n if parent[i] != i:\n parent[i] = find(parent, parent[i])\n return parent[i]\n\ndef union(parent, rank, x, y):\n rootX = find(parent, x)\n rootY = find(parent, y)\n if rootX != rootY:\n if rank[rootX] > rank[rootY]:\n parent... |
taco | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nGarry is looking at the sky. Such a beautiful day! He not... | code | {
"ground_truth": "{\"inputs\": [\"1\\n10000 0 10000 10000 0 10000\\n3\\n10000 0 10000 10000 5000 5000\\n5000 5000 10000 10000 0 10000\\n0 0 0 1000 1000 0\\n\", \"2\\n9996 0 9997 0 0 1\\n9999 0 10000 0 0 1\\n2\\n9997 0 9998 0 0 1\\n9998 0 9999 0 0 1\\n\", \"1\\n2 0 2 4 4 2\\n2\\n2 0 2 2 4 2\\n2 2 4 2 2 4\\n\"], \"out... | {
"index": 0,
"raw_program": "from collections import defaultdict\nimport hashlib\n\ndef get_triangle_hash(triangle):\n # Sort the points to ensure the same triangle is represented uniquely\n points = sorted([(x, y) for x, y in zip(triangle[::2], triangle[1::2])])\n # Convert sorted points into a string an... |
taco | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nExample\n\nInput\n\n4 5 3\n-10 -10\n10 -10\n10 10\n-10 10... | code | {
"ground_truth": "{\"inputs\": [\"4 5 3\\n-10 -10\\n10 -10\\n10 10\\n-10 10\\n1 2\\n1 3\\n1 4\\n2 3\\n3 4\\n-20 0\\n1 0\\n20 0\"], \"outputs\": [\"No\\nYes\\nNo\"]}",
"style": "rule"
} | {
"index": 0,
"raw_program": "def is_point_in_polygon(px, py, polygon):\n n = len(polygon)\n inside = False\n p1x, p1y = polygon[0]\n for i in range(n + 1):\n p2x, p2y = polygon[i % n]\n if py > min(p1y, p2y):\n if py <= max(p1y, p2y):\n if px <= max(p1x, p2x):\n ... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nFour players participate in the playoff tournament. The t... | code | {
"ground_truth": "{\"inputs\": [\"4\\n3 7 9 5\\n4 5 6 9\\n5 3 8 1\\n6 5 3 2\\n\", \"1\\n8 6 2 7\\n\", \"1\\n8 6 0 7\\n\", \"4\\n3 7 9 5\\n4 5 6 9\\n5 3 8 1\\n2 5 3 2\\n\", \"1\\n2 4 -1 1\\n\", \"4\\n3 7 9 6\\n4 5 6 9\\n5 3 8 1\\n6 5 3 2\\n\", \"4\\n3 7 9 5\\n4 5 6 1\\n5 3 8 1\\n2 5 3 2\\n\", \"4\\n3 7 9 6\\n4 5 10 9... | {
"index": 0,
"raw_program": "def is_tournament_fair(s1, s2, s3, s4):\n # Sort the skills to easily identify the top two\n skills = sorted([s1, s2, s3, s4])\n highest = skills[3]\n second_highest = skills[2]\n \n # Determine the winners of the first round\n # The highest skill will always win a... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nFour players participate in the playoff tournament. The t... | code | {
"ground_truth": "{\"inputs\": [\"4\\n3 7 9 5\\n4 5 6 9\\n5 3 8 1\\n6 5 3 2\\n\", \"1\\n8 6 2 7\\n\", \"1\\n8 6 0 7\\n\", \"4\\n3 7 9 5\\n4 5 6 9\\n5 3 8 1\\n2 5 3 2\\n\", \"1\\n2 4 -1 1\\n\", \"4\\n3 7 9 6\\n4 5 6 9\\n5 3 8 1\\n6 5 3 2\\n\", \"4\\n3 7 9 5\\n4 5 6 1\\n5 3 8 1\\n2 5 3 2\\n\", \"4\\n3 7 9 6\\n4 5 10 9... | {
"index": 0,
"raw_program": "def is_fair_tournament(t, skill_sets):\n def tournament_is_fair(s1, s2, s3, s4):\n # Sort the skills to easily find the top two players\n players = sorted([s1, s2, s3, s4], reverse=True)\n top_two = players[:2]\n \n # Determine the winners of the f... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nFour players participate in the playoff tournament. The t... | code | {
"ground_truth": "{\"inputs\": [\"4\\n3 7 9 5\\n4 5 6 9\\n5 3 8 1\\n6 5 3 2\\n\", \"1\\n8 6 2 7\\n\", \"1\\n8 6 0 7\\n\", \"4\\n3 7 9 5\\n4 5 6 9\\n5 3 8 1\\n2 5 3 2\\n\", \"1\\n2 4 -1 1\\n\", \"4\\n3 7 9 6\\n4 5 6 9\\n5 3 8 1\\n6 5 3 2\\n\", \"4\\n3 7 9 5\\n4 5 6 1\\n5 3 8 1\\n2 5 3 2\\n\", \"4\\n3 7 9 6\\n4 5 10 9... | {
"index": 0,
"raw_program": "def is_fair_tournament(test_cases):\n results = []\n for skills in test_cases:\n # Sort the skills to easily identify the top two players\n sorted_skills = sorted(skills)\n highest = sorted_skills[-1]\n second_highest = sorted_skills[-2]\n \n ... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nFour players participate in the playoff tournament. The t... | code | {
"ground_truth": "{\"inputs\": [\"4\\n3 7 9 5\\n4 5 6 9\\n5 3 8 1\\n6 5 3 2\\n\", \"1\\n8 6 2 7\\n\", \"1\\n8 6 0 7\\n\", \"4\\n3 7 9 5\\n4 5 6 9\\n5 3 8 1\\n2 5 3 2\\n\", \"1\\n2 4 -1 1\\n\", \"4\\n3 7 9 6\\n4 5 6 9\\n5 3 8 1\\n6 5 3 2\\n\", \"4\\n3 7 9 5\\n4 5 6 1\\n5 3 8 1\\n2 5 3 2\\n\", \"4\\n3 7 9 6\\n4 5 10 9... | {
"index": 0,
"raw_program": "def is_fair_tournament(test_cases):\n results = []\n for case in test_cases:\n skills = sorted(case)\n # The two players with the highest skills are the last two in the sorted list.\n highest_skill_players = skills[-2:]\n # Determine the winners of the... |
taco | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nTo destroy humanity, The Monster Association sent $n$ mon... | code | {
"ground_truth": "{\"inputs\": [\"3\\n6 7\\n18 5 13 9 10 1\\n2 7 2 1 2 6\\n3 4\\n5 5 5\\n4 4 4\\n3 2\\n2 1 3\\n1 1 1\\n\", \"1\\n2 1\\n1000000000 1\\n1 1000000000\\n\"], \"outputs\": [\"YES\\nNO\\nYES\\n\", \"NO\\n\"]}",
"style": "rule"
} | {
"index": 0,
"raw_program": "def can_kill_all_monsters(t, test_cases):\n results = []\n for n, k, h, p in test_cases:\n alive_monsters = [(h_i, p_i) for h_i, p_i in zip(h, p) if h_i > 0]\n alive_monsters.sort(key=lambda x: x[1]) # Sort by power\n \n while alive_monsters:\n ... |
taco | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nTo destroy humanity, The Monster Association sent $n$ mon... | code | {
"ground_truth": "{\"inputs\": [\"3\\n6 7\\n18 5 13 9 10 1\\n2 7 2 1 2 6\\n3 4\\n5 5 5\\n4 4 4\\n3 2\\n2 1 3\\n1 1 1\\n\", \"1\\n2 1\\n1000000000 1\\n1 1000000000\\n\"], \"outputs\": [\"YES\\nNO\\nYES\\n\", \"NO\\n\"]}",
"style": "rule"
} | {
"index": 0,
"raw_program": "def can_kill_monsters(n, k, h, p):\n # Pair each monster's health and power, then sort by health\n monsters = sorted(zip(h, p))\n \n while monsters:\n # Reduce health by current attack damage\n monsters = [(health - k, power) for health, power in monsters if h... |
taco | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nTo destroy humanity, The Monster Association sent $n$ mon... | code | {
"ground_truth": "{\"inputs\": [\"3\\n6 7\\n18 5 13 9 10 1\\n2 7 2 1 2 6\\n3 4\\n5 5 5\\n4 4 4\\n3 2\\n2 1 3\\n1 1 1\\n\", \"1\\n2 1\\n1000000000 1\\n1 1000000000\\n\"], \"outputs\": [\"YES\\nNO\\nYES\\n\", \"NO\\n\"]}",
"style": "rule"
} | {
"index": 0,
"raw_program": "from typing import List\n\ndef can_genos_win(n: int, k: int, health: List[int], power: List[int]) -> str:\n # Pair each health with its corresponding power and sort by power\n monsters = sorted(zip(health, power), key=lambda x: x[1])\n \n for h, p in monsters:\n # If... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nYou are given a weighed undirected connected graph, consi... | code | {
"ground_truth": "{\"inputs\": [\"8 13\\n1 2 4\\n2 3 6\\n3 4 1\\n4 5 12\\n5 6 3\\n6 7 8\\n7 8 7\\n1 4 1\\n1 8 3\\n2 6 9\\n2 7 1\\n4 6 3\\n6 8 2\\n8\\n1 5\\n1 7\\n2 3\\n2 8\\n3 7\\n3 4\\n6 8\\n7 8\\n\", \"3 3\\n1 2 3\\n2 3 1\\n3 1 5\\n3\\n1 2\\n1 3\\n2 3\\n\", \"8 13\\n1 2 4\\n2 3 10\\n3 4 1\\n4 5 12\\n5 6 3\\n6 7 8\... | {
"index": 0,
"raw_program": "import heapq\nfrom collections import defaultdict, deque\n\ndef dijkstra(graph, start, n):\n distances = [float('inf')] * (n + 1)\n distances[start] = 0\n priority_queue = [(0, start)]\n \n while priority_queue:\n current_distance, current_vertex = heapq.heappop(p... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nYou are given a weighed undirected connected graph, consi... | code | {
"ground_truth": "{\"inputs\": [\"8 13\\n1 2 4\\n2 3 6\\n3 4 1\\n4 5 12\\n5 6 3\\n6 7 8\\n7 8 7\\n1 4 1\\n1 8 3\\n2 6 9\\n2 7 1\\n4 6 3\\n6 8 2\\n8\\n1 5\\n1 7\\n2 3\\n2 8\\n3 7\\n3 4\\n6 8\\n7 8\\n\", \"3 3\\n1 2 3\\n2 3 1\\n3 1 5\\n3\\n1 2\\n1 3\\n2 3\\n\", \"8 13\\n1 2 4\\n2 3 10\\n3 4 1\\n4 5 12\\n5 6 3\\n6 7 8\... | {
"index": 0,
"raw_program": "import sys\nfrom math import inf\n\ndef floyd_warshall(graph, n):\n for k in range(n):\n for i in range(n):\n for j in range(n):\n graph[i][j] = min(graph[i][j], graph[i][k] + graph[k][j])\n\ndef main():\n n, m = map(int, input().strip().split())\... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nYou are given a weighed undirected connected graph, consi... | code | {
"ground_truth": "{\"inputs\": [\"8 13\\n1 2 4\\n2 3 6\\n3 4 1\\n4 5 12\\n5 6 3\\n6 7 8\\n7 8 7\\n1 4 1\\n1 8 3\\n2 6 9\\n2 7 1\\n4 6 3\\n6 8 2\\n8\\n1 5\\n1 7\\n2 3\\n2 8\\n3 7\\n3 4\\n6 8\\n7 8\\n\", \"3 3\\n1 2 3\\n2 3 1\\n3 1 5\\n3\\n1 2\\n1 3\\n2 3\\n\", \"8 13\\n1 2 4\\n2 3 10\\n3 4 1\\n4 5 12\\n5 6 3\\n6 7 8\... | {
"index": 0,
"raw_program": "import heapq\nfrom collections import defaultdict\n\ndef dijkstra(graph, start):\n # Initialize distances with infinity and set distance of start to 0\n distances = {vertex: float('inf') for vertex in graph}\n distances[start] = 0\n # Priority queue to hold (distance, verte... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nYou are given a weighed undirected connected graph, consi... | code | {
"ground_truth": "{\"inputs\": [\"8 13\\n1 2 4\\n2 3 6\\n3 4 1\\n4 5 12\\n5 6 3\\n6 7 8\\n7 8 7\\n1 4 1\\n1 8 3\\n2 6 9\\n2 7 1\\n4 6 3\\n6 8 2\\n8\\n1 5\\n1 7\\n2 3\\n2 8\\n3 7\\n3 4\\n6 8\\n7 8\\n\", \"3 3\\n1 2 3\\n2 3 1\\n3 1 5\\n3\\n1 2\\n1 3\\n2 3\\n\", \"8 13\\n1 2 4\\n2 3 10\\n3 4 1\\n4 5 12\\n5 6 3\\n6 7 8\... | {
"index": 0,
"raw_program": "import heapq\n\ndef floyd_warshall(graph):\n dist = [[float('inf')] * len(graph) for _ in range(len(graph))]\n for u in range(len(graph)):\n dist[u][u] = 0\n for v, w in graph[u]:\n dist[u][v] = w\n \n for k in range(len(graph)):\n for i in r... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nByteland is a country whose population squares every year... | code | {
"ground_truth": "{\"inputs\": [\"2\\n5 2002\\n3 2000\", \"2\\n5 2955\\n3 2000\", \"2\\n7 2955\\n3 2000\", \"2\\n7 2955\\n6 2000\", \"2\\n7 3525\\n6 1480\", \"2\\n6 3525\\n6 1480\", \"2\\n6 1343\\n6 1480\", \"2\\n0 1419\\n6 1480\", \"2\\n1 3405\\n6 1480\", \"2\\n1 3171\\n8 1075\", \"2\\n1 4734\\n8 2055\", \"2\\n1 47... | {
"index": 0,
"raw_program": "def population_in_year(pi, yi):\n \"\"\"\n Calculate the population in the given year yi, starting from pi in the year 2000.\n The population squares every year.\n \n Args:\n pi: Population in the year 2000.\n yi: The year for which we want to find the population.\... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nByteland is a country whose population squares every year... | code | {
"ground_truth": "{\"inputs\": [\"2\\n5 2002\\n3 2000\", \"2\\n5 2955\\n3 2000\", \"2\\n7 2955\\n3 2000\", \"2\\n7 2955\\n6 2000\", \"2\\n7 3525\\n6 1480\", \"2\\n6 3525\\n6 1480\", \"2\\n6 1343\\n6 1480\", \"2\\n0 1419\\n6 1480\", \"2\\n1 3405\\n6 1480\", \"2\\n1 3171\\n8 1075\", \"2\\n1 4734\\n8 2055\", \"2\\n1 47... | {
"index": 0,
"raw_program": "def population_in_year(pi, yi):\n MOD = 10**9 + 7\n years_passed = yi - 2000\n population = pi\n for _ in range(years_passed):\n population = (population * population) % MOD\n return population\n\ndef process_cases():\n import sys\n input = sys.stdin.read\n ... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nByteland is a country whose population squares every year... | code | {
"ground_truth": "{\"inputs\": [\"2\\n5 2002\\n3 2000\", \"2\\n5 2955\\n3 2000\", \"2\\n7 2955\\n3 2000\", \"2\\n7 2955\\n6 2000\", \"2\\n7 3525\\n6 1480\", \"2\\n6 3525\\n6 1480\", \"2\\n6 1343\\n6 1480\", \"2\\n0 1419\\n6 1480\", \"2\\n1 3405\\n6 1480\", \"2\\n1 3171\\n8 1075\", \"2\\n1 4734\\n8 2055\", \"2\\n1 47... | {
"index": 0,
"raw_program": "def calculate_population(pi, yi):\n MOD = 10**9 + 7\n years_passed = yi - 2000\n population = pi\n for _ in range(years_passed):\n population = (population * population) % MOD\n return population\n\ndef solve_population_query():\n import sys\n input = sys.st... |
codecontests | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nByteland is a country whose population squares every year... | code | {
"ground_truth": "{\"inputs\": [\"2\\n5 2002\\n3 2000\", \"2\\n5 2955\\n3 2000\", \"2\\n7 2955\\n3 2000\", \"2\\n7 2955\\n6 2000\", \"2\\n7 3525\\n6 1480\", \"2\\n6 3525\\n6 1480\", \"2\\n6 1343\\n6 1480\", \"2\\n0 1419\\n6 1480\", \"2\\n1 3405\\n6 1480\", \"2\\n1 3171\\n8 1075\", \"2\\n1 4734\\n8 2055\", \"2\\n1 47... | {
"index": 0,
"raw_program": "def mod_exp(base, exp, mod):\n result = 1\n base = base % mod\n while exp > 0:\n if exp % 2 == 1:\n result = (result * base) % mod\n exp = exp >> 1\n base = (base * base) % mod\n return result\n\nT = int(input())\nfor _ in range(T):\n pi, ... |
taco | [
{
"content": "You are an expert programmer specializing in optimization algorithms. Your task is to improve the given code to solve the corresponding question. Here is the question: ",
"role": "system"
},
{
"content": "# Question Description\nJack and Daniel are friends. Both of them like letters, e... | code | {
"ground_truth": "{\"inputs\": [\"1\\nABCD\\nDCBA\\n\", \"1\\nJASON\\nHAD\\n\", \"1\\nBBB\\nAAA\\n\", \"2\\nTEST\\nCASE\\nPROGRAM\\nTEST\\n\", \"2\\nABC\\nABC\\nXYZ\\nXYZ\\n\"], \"outputs\": [\"ABCDCBAD\", \"HADJASON\", \"AAABBB\", \"CASETEST\\nPROGRAMTEST\", \"AABBCC\\nXXYYZZ\"]}",
"style": "rule"
} | {
"index": 0,
"raw_program": "def morganAndString(a, b):\n # Convert strings to lists for stack-like behavior\n stack_a = list(a)\n stack_b = list(b)\n \n result = []\n \n # Process until both stacks are empty\n while stack_a or stack_b:\n # Compare the top elements of both stacks\n ... |
End of preview.
No dataset card yet
- Downloads last month
- 20