Dataset Viewer
Auto-converted to Parquet Duplicate
conversations
listlengths
2
2
category
stringclasses
1 value
generator
stringclasses
2 values
[ { "from": "user", "value": "Given an array of integers, return the length of the longest increasing subsequence. However, for this task, the subsequence can only contain even numbers.\ninput array = \\[$1, 3, 6, 7, 9, 4, 10, 5, 6\\]$\n\nReference Solution (Wrong):\n```python\ndef longest_increasing_subseque...
code
DeepSeek-R1
[ { "from": "user", "value": "Modify the `find_mode` function to support a new `limit` parameter. If the number of modes is greater than this limit, return a list containing only the first `limit` most frequently occurring numbers, in order of their first occurrence.\n\nExample:\nInput: [1, 2, 3, 2, 4, 4, 4, ...
code
DeepSeek-R1
[ { "from": "user", "value": "Write a Python program that prompts the user to enter a number and then print a list from 1 to that number.\nWrite a Python program that prompts the user to enter a number and then print a list from 1 to that number. However, the list must only contain prime numbers. Also, the pr...
code
DeepSeek-R1
[ { "from": "user", "value": "Write a python function `find_product(lst)` that takes a list `lst` of integers as an argument and returns a dictionary mapping every unique integer `k` in `lst` to the product of all integers in `lst` except for `k`. If an integer is not in `lst`, it should not appear in the dic...
code
DeepSeek-R1
[ { "from": "user", "value": "" }, { "from": "assistant", "value": "**Even Integer Filter Function**\n================================\n\n### Description\n\nThis function takes a list of integers as input, filters out the odd integers, and returns a new list containing only the even integers.\n\n#...
code
Llama-3.3-70B-Instruct
[ { "from": "user", "value": "Write a function that receives a list of integers and a target integer. The function should return `True` if all the integers in the list are non-negative, less than the target integer, and are in ascending order. Otherwise, return `False`. Do not use the built-in function `all()...
code
DeepSeek-R1
[ { "from": "user", "value": "" }, { "from": "assistant", "value": "### Incorrect Solution Analysis\nThe provided reference solution has several issues:\n* It only returns the position of the last pair of integers with the smallest absolute difference, not all pairs.\n* It does not count the occur...
code
Llama-3.3-70B-Instruct
[ { "from": "user", "value": "Write a Python program to extract unique values from a list that contains duplicate values, but modify the list into a tuple before extracting the unique values. List = ('a', 'a', 'b', 'b', 'c', 'c', 'c')\n\nReference Solution (Wrong):\n```\n# Given List\nlist_with_duplicates = (...
code
DeepSeek-R1
[ { "from": "user", "value": "" }, { "from": "assistant", "value": "### Solution\n#### Problem Statement\nGiven a list of integers `nums` and a number `n`, find the nth largest unique integer in the list. If there are less than n unique integers in the list, return the largest unique integer.\n\n#...
code
Llama-3.3-70B-Instruct
[ { "from": "user", "value": "Write a code to find the intersection of two lists. Return the intersection as a new list. The intersection of two lists is the set of elements that are common to both lists.\n\\[1, 2, 3\\], \\[3, 4, 5\\]" }, { "from": "assistant", "value": "<think>\nOkay, I need to f...
code
DeepSeek-R1
[ { "from": "user", "value": "Write a program that uses a stack to reverse a string.\nI love Python" }, { "from": "assistant", "value": "<think>\nOkay, I need to write a Python program that reverses a string using a stack. Let's think about how stacks work. A stack is a LIFO structure, so the last...
code
DeepSeek-R1
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
180