Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
32
32
input
stringlengths
181
3.45k
output
stringlengths
0
19.8k
domain
stringclasses
2 values
generation_algorithm
stringclasses
2 values
llm_judgement
stringlengths
446
1.62k
unit_tests
stringlengths
277
6.65k
tests_execution_status
stringclasses
708 values
average_test_score
stringclasses
11 values
reasoning
stringlengths
1.22k
147k
45ec4865601377389e9590693d52df71
You are tasked with implementing a custom sorting algorithm in Python to sort a list of integers in ascending order. Your function should be named `custom_sort`. The algorithm you choose to implement must be either bubble sort or selection sort. Your function should return the sorted list. **Input:** - A list of integ...
To solve the problem of sorting a list of integers in ascending order using a custom sorting algorithm, we will implement **Selection Sort**. This algorithm is chosen for its simplicity and clarity in implementation, as well as its efficiency for small to moderately sized lists. --- ### ✅ **Approach: Selection Sort**...
generic
self-instruct
{"requirement_conformance": {"score": 5, "justification": "The solution fully meets the requirement by implementing a custom sorting algorithm (selection sort) that sorts a list of integers in ascending order and is named `custom_sort`."}, "logical_correctness": {"score": 5, "justification": "The logic of the selection...
["\nassert custom_sort([64, 25, 12, 22, 11]) == [11, 12, 22, 25, 64]\n", "\nassert custom_sort([5, 2, 9, 1, 5, 6]) == [1, 2, 5, 5, 6, 9]\n", "\nassert custom_sort([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\n", "\nassert custom_sort([5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5]\n", "\nassert custom_sort([]) == []\n", "\nassert custom_so...
["pass", "pass", "pass", "pass", "pass", "pass", "pass", "pass", "pass", "pass"]
1
Okay, I need to write a custom sorting function called custom_sort that uses either bubble sort or selection sort. Let me think about which one to choose. Both have similar time complexities, but maybe bubble sort is easier to implement? Or maybe selection sort? Let me recall how they work. Bubble sort works by repeat...
677939876b07542e01433f5406ed0a25
You are given a directed graph with `n` nodes and `m` edges. Each node `i` has an associated profit `p_i`, and each edge `j` connecting node `u_j` to node `v_j` has an associated cost `c_j`. Your task is to find a path starting from node 1 that maximizes the total profit minus the total cost. If multiple paths yield th...
To solve this problem, we need to find a path starting from node 1 that maximizes the total profit minus the total cost. Each node has an associated profit, and each edge has an associated cost. The goal is to determine the path that yields the highest net value (total profit minus total cost). ### Approach 1. **Graph...
algorithmic
self-instruct
{"requirement_conformance": {"score": 4, "justification": "The solution addresses the main requirement of finding a path starting from node 1 that maximizes the total profit minus the total cost. However, it does not handle the case where no path exists from node 1 to any other node, which could result in an incorrect ...
["\nassert max_profit_minus_cost(1, 0, [10], []) == 10\n", "\nassert max_profit_minus_cost(2, 1, [10, 20], [(1, 2, 5)]) == 25\n", "\nassert max_profit_minus_cost(3, 2, [10, 20, 30], [(1, 2, 5), (2, 3, 10)]) == 45\n", "\nassert max_profit_minus_cost(3, 2, [10, 20, 30], [(1, 2, 25), (2, 3, 10)]) == 10\n", "\nassert max_p...
["pass", "pass", "pass", "fail", "fail", "fail", "fail", "fail", "fail", "fail"]
0.3
Okay, let's tackle this problem. So, the task is to find a path starting from node 1 that maximizes the total profit minus the total cost. Hmm, right. Each node has a profit, and each edge has a cost. So the total profit would be the sum of the profits of the nodes visited, minus the sum of the costs of the edges taken...
59922d1e09a12101a8018344e6f34b44
You are tasked with implementing a function to display a tree structure in the console. The tree is represented as a dictionary where each key is a node name and each value is a list of its child node names. Your function should print the tree starting from the root node, with each level of the tree indented by two spa...
To display a tree structure in the console, we can use a recursive approach. The tree is represented as a dictionary where each key is a node and its value is a list of child nodes. The root node is provided, and we need to print the tree with proper indentation to indicate the hierarchy. --- ### ✅ **Approach** We d...
generic
self-instruct
{"requirement_conformance": {"score": 5, "justification": "The solution fully meets the requirements by correctly printing the tree structure with each level indented by two spaces."}, "logical_correctness": {"score": 5, "justification": "The logic is completely correct and optimally structured. The function uses recur...
["\nassert print_tree({\"root\": [\"child1\", \"child2\"]}, \"root\") == \"root\\n child1\\n child2\"\n", "\nassert print_tree({\"root\": [\"child1\"]}, \"root\") == \"root\\n child1\"\n", "\nassert print_tree({\"root\": []}, \"root\") == \"root\"\n", "\nassert print_tree({\"root\": [\"child1\", \"child2\"], \"child...
["fail", "fail", "fail", "fail", "fail", "fail", "fail", "fail", "fail", "fail"]
0
Okay, I need to write a function that takes a tree dictionary and a root node, then prints the tree structure with proper indentation. Let me think about how to approach this. First, the tree is represented as a dictionary where each key is a node, and the value is a list of its children. The root is given, so I need ...
fd546ced41c1bc61f2e0254a837b2484
You are given the task of simulating the placement of `n` stars in a spiral constellation centered at the origin (0,0) on a 2D plane. The first star should be positioned at the topmost point (0, radius). The stars must be distributed along a logarithmic spiral defined by the equation `r = a * e^(b * θ)`, where `a` and ...
To simulate the placement of `n` stars in a spiral constellation centered at the origin on a 2D plane, we must adhere to the following key requirements: - The **first star** is placed at the **topmost point** `(0, radius)` which corresponds to an angle `θ = π/2` and radius `r = radius`. - The **stars are distributed a...
generic
evol-instruct
{"requirement_conformance": {"score": 4, "justification": "The function generates a spiral pattern of stars and returns a list of tuples representing the coordinates. It meets the basic requirements but could benefit from more detailed specifications for constants a and b, and the angle increment calculation could be m...
["\nassert len(generate_constellation(1)) == 1\n", "\nassert generate_constellation(1) == [(0.0, 1.0)]\n", "\nassert len(generate_constellation(5)) == 5\n", "\nassert generate_constellation(0) == []\n", "\nassert generate_constellation(2)[0][1] > generate_constellation(2)[1][1]\n", "\nassert generate_constellation(3)[0...
["pass", "fail", "pass", "fail", "fail", "fail", "pass", "fail", "fail", "pass"]
0.4
Okay, I need to simulate placing n stars in a spiral constellation. The spiral is defined by r = a * e^(bθ), and the stars should be evenly spaced along this spiral. The first star is at (0, radius), which is the topmost point. Let me think about how to approach this. First, the spiral starts at θ = π/2. Since the fir...
09904b654c87c0697844fcf03431e7d4
You are given a string `s`. Your task is to write a function `count_vowels_consonants` that processes the string and returns a dictionary with two keys: `'vowels'` and `'consonants'`. The values associated with these keys should represent the number of vowels and consonants in the string, respectively. The function sho...
To solve the problem of counting vowels and consonants in a given string, we need to process the string while ignoring non-alphabetic characters and treating uppercase and lowercase letters as equivalent. Here's a clear and efficient implementation of the required function. --- ### ✅ Problem Breakdown - **Input:** A...
generic
self-instruct
{"requirement_conformance": {"score": 5, "justification": "The function fully meets all the specified requirements. It takes a string as input, returns a dictionary with counts of vowels and consonants, ignores non-alphabetic characters, and is case-insensitive."}, "logical_correctness": {"score": 5, "justification": "...
["\nassert count_vowels_consonants(\"Hello, World!\") == {'vowels': 3, 'consonants': 7}\n", "\nassert count_vowels_consonants(\"Python Programming\") == {'vowels': 4, 'consonants': 11}\n", "\nassert count_vowels_consonants(\"AEIOU\") == {'vowels': 5, 'consonants': 0}\n", "\nassert count_vowels_consonants(\"bcdfg\") == ...
["pass", "fail", "pass", "pass", "pass", "pass", "fail", "pass", "pass", "pass"]
0.8
Okay, I need to write a function called count_vowels_consonants that takes a string and returns a dictionary with the counts of vowels and consonants. Let me think about how to approach this. First, the problem says to ignore non-alphabetic characters. So I need to process each character in the string and check if it'...
c9023f53e0045f9faf7d58cfc1a6a3a8
"You are given a hypergraph `H` represented as a list of edges, where each edge is a set of nodes. Y(...TRUNCATED)
"To compute the **s-centrality** of nodes in a hypergraph using a given centrality function, we need(...TRUNCATED)
generic
evol-instruct
"{\"requirement_conformance\": {\"score\": 3, \"justification\": \"The solution converts the hypergr(...TRUNCATED)
"[\"\\nassert compute_s_centrality([{'a', 'b'}, {'b', 'c'}], nx.degree_centrality) == {'a': 0.5, 'b'(...TRUNCATED)
"[\"fail\", \"fail\", \"fail\", \"fail\", \"fail\", \"fail\", \"fail\", \"fail\", \"fail\", \"fail\"(...TRUNCATED)
0
"Okay, I need to compute the s-centrality of nodes or edges in a hypergraph using a given centrality(...TRUNCATED)
fbbb0c0887a9a0c73bd3a8120ee916e6
"You are given a sequence of integers. Your task is to implement a function `sum_of_even_elements` t(...TRUNCATED)
"To solve the problem of computing the sum of even numbers in a sequence, we need to carefully handl(...TRUNCATED)
generic
evol-instruct
"{\"requirement_conformance\": {\"score\": 5, \"justification\": \"The solution fully meets all spec(...TRUNCATED)
"[\"\\nassert sum_of_even_elements([1, 2, 3, 4, 5]) == 6\\n\", \"\\nassert sum_of_even_elements(rang(...TRUNCATED)
"[\"pass\", \"pass\", \"pass\", \"fail\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\"(...TRUNCATED)
0.9
"Okay, let's see. I need to write a function called sum_of_even_elements that takes a sequence of in(...TRUNCATED)
a60116ba63b3ef08f472bde38f8f9633
"You are given a list of distinct integers `elements` and an integer `n`. Your task is to write a fu(...TRUNCATED)
"To solve the problem of generating all possible combinations of `n` elements from a given list of d(...TRUNCATED)
generic
self-instruct
"{\"requirement_conformance\": {\"score\": 5, \"justification\": \"The function fully meets the requ(...TRUNCATED)
"[\"\\nassert generate_combinations([1, 2, 3, 4], 2) == [(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3,(...TRUNCATED)
"[\"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\"(...TRUNCATED)
1
"Okay, I need to write a Python function called generate_combinations that takes a list of integers (...TRUNCATED)
3a0e0f6ee90a20df30951c09c29ada0d
"You are tasked with implementing a `Matrix` class in Python that supports basic matrix operations. (...TRUNCATED)
"To solve the problem, we implement a `Matrix` class in Python that supports basic matrix operations(...TRUNCATED)
generic
self-instruct
"{\"requirement_conformance\": {\"score\": 4, \"justification\": \"The class meets most of the speci(...TRUNCATED)
"[\"\\nassert str(Matrix([[1, 2], [3, 4]])) == \\\"1\\\\t2\\\\n3\\\\t4\\\"\\n\", \"\\nassert (Matrix(...TRUNCATED)
"[\"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\"(...TRUNCATED)
1
"Okay, I need to create a Matrix class in Python that can handle all these operations. Let me start (...TRUNCATED)
07ef99918679cecd9602bbdee0ee65ee
"You are given three integers `a`, `b`, and `c`. Your task is to implement a function `rotate_number(...TRUNCATED)
"To solve the problem of rotating three integers `a`, `b`, and `c` such that the first moves to the (...TRUNCATED)
generic
evol-instruct
"{\"requirement_conformance\": {\"score\": 5, \"justification\": \"The function fully meets the requ(...TRUNCATED)
"[\"\\nassert rotate_numbers(1, 2, 3) == (3, 1, 2)\\n\", \"\\nassert rotate_numbers(4, 5, 6) == (6, (...TRUNCATED)
"[\"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\", \"pass\"(...TRUNCATED)
1
"Okay, I need to solve this problem where I have to rotate three numbers a, b, c such that the first(...TRUNCATED)
End of preview. Expand in Data Studio

Generated dataset

This dataset was pushed from existing parquet chunks with the following command:

python push_only.py --work_dir ./regen_melhoushi__OpenCodeInstruct-Qwen3-8B-think --output_repo melhoushi/OpenCodeInstruct-Qwen3-8B-think --split train

Parameters

  • work_dir: ./regen_melhoushi__OpenCodeInstruct-Qwen3-8B-think
  • output_repo: melhoushi/OpenCodeInstruct-Qwen3-8B-think
  • dataset_config: None
  • split: train
  • private: False

Notes

This README was generated automatically by the standalone push-only script.

Downloads last month
16