Dataset Viewer
Auto-converted to Parquet Duplicate
conversations
list
[ { "from": "user", "value": "You are given a circular **n-indexed** integer array `nums` where the index starts from `0` and ends at `n-1`. The circular aspect means the array wraps around, so the element following the last element is the first element again. Your task is to identify the length of the longes...
[ { "from": "user", "value": "### Regular String Expressions Matching\n\nYou are required to write a Python function that emulates a simplified version of a regular expression matcher. This simplified regular expression matcher should support the following special characters:\n\n1. `.` - Matches any single ch...
[ { "from": "user", "value": "def sum_face_up_cards(n, sequence):\n \"\"\"\n Returns the sum of face-up integers in the provided sequence of cards.\n\n Parameters:\n n (int): Number of cards.\n sequence (list of str): Sequence containing integers and 'X' characters.\n\n Returns:\n int: Su...
[ { "from": "user", "value": "Create a function that generates a list of prime numbers up to a given number n. The function should be efficient and use a well-known algorithm for prime number generation." }, { "from": "assistant", "value": "<think>\nOkay, I need to create a function that generates...
[ { "from": "user", "value": "Write a python function to flatten a list which can contain other lists as elements, up to a specified depth." }, { "from": "assistant", "value": "<think>\nOkay, I need to write a Python function to flatten a list that might contain other lists as elements, but only u...
[ { "from": "user", "value": "import heapq\n\nclass MedianFinder:\n \"\"\"\n A data structure that supports adding numbers and finding the median of the current numbers.\n \"\"\"\n\n def __init__(self):\n \"\"\" Initialize your data structure here. \"\"\"\n # max-heap for the first h...
[ { "from": "user", "value": "You are given a string `s` and an integer `k`. The string `s` can be broken down into `k` contiguous substrings by inserting `k-1` dividers. Return _the length of the smallest possible largest substring among these `k` substrings_. In other words, determine the minimum possible v...
[{"from":"user","value":"def most_frequent_element_frequency(arr: List[int]) -> int:\n \"\"\" Ret(...TRUNCATED)
[{"from":"user","value":"## Coding Challenge: Game of Numbers - Maximum Subarray Sum\n\n### Objectiv(...TRUNCATED)
[{"from":"user","value":"### Coding Assessment\n\n#### Problem Statement\n\nYou are given two string(...TRUNCATED)
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
10