Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
2
6
media
images listlengths
1
1
messages
stringlengths
3.06k
15.8k
q1
[{"role": "user", "question": "def solution(red_triangle: tuple, orange_dots: list) -> int:\n \"\"\"\n Determine the number of iterations required to absorb all the orange dots.\n\n Parameters:\n red_triangle (tuple): The coordinates of the red triangle (x0, y0).\n orange_dots (list): A list of tuples, w...
q1-2
[{"role": "user", "question": "def solution(red_triangle: tuple, orange_dots: list) -> int:\n \"\"\"\n Determine the number of iterations required to absorb all the orange dots.\n\n Parameters:\n red_triangle (tuple): The coordinates of the red triangle (x0, y0).\n orange_dots (list): A list of tuples, w...
q1-3
[{"role": "user", "question": "def solution(red_triangle: tuple, orange_dots: list) -> int:\n \"\"\"\n Determine the number of iterations required to absorb all the orange dots.\n\n Parameters:\n red_triangle (tuple): The coordinates of the red triangle (x0, y0).\n orange_dots (list): A list of tuples, w...
q10
[{"role": "user", "question": "from typing import List\n\ndef solution(n: int) -> List[List[int]]:\n \"\"\"\n Given an n x n grid, determine the coordinates of a specific pattern that is formed on the grid. \n \n Parameters:\n n (int): The dimensions of the grid (which is an n*n 2D matrix). n is alwa...
q10-2
[{"role": "user", "question": "from typing import List\n\ndef solution(n: int) -> List[List[int]]:\n \"\"\"\n Given an n x n grid, determine the coordinates of a specific pattern that is formed on the grid. \n \n Parameters:\n n (int): The dimensions of the grid (which is an n*n 2D matrix). n is alwa...
q10-3
[{"role": "user", "question": "from typing import List\n\ndef solution(n: int) -> List[List[int]]:\n \"\"\"\n Given an n x n grid, determine the coordinates of a specific pattern that is formed on the grid. \n \n Parameters:\n n (int): The dimensions of the grid (which is an n*n 2D matrix). n is alwa...
q100
[{"role": "user", "question": "from typing import Tuple\nimport math\n\ndef solution(coordinate: Tuple[int, int]) -> int:\n \"\"\"\n Determines the color of the zone at the given coordinate.\n The colors follow an infinitely repeating pattern.\n\n Args:\n coordinate: A tuple (x, y) representing the c...
q100-2
[{"role": "user", "question": "from typing import Tuple\nimport math\n\ndef solution(coordinate: Tuple[int, int]) -> int:\n \"\"\"\n Determines the color of the zone at the given coordinate.\n The colors follow an infinitely repeating pattern.\n\n Args:\n coordinate: A tuple (x, y) representing the c...
q100-3
[{"role": "user", "question": "from typing import Tuple\nimport math\n\ndef solution(coordinate: Tuple[int, int]) -> int:\n \"\"\"\n Determines the color of the zone at the given coordinate.\n The colors follow an infinitely repeating pattern.\n\n Args:\n coordinate: A tuple (x, y) representing the c...
q11
[{"role": "user", "question": "from typing import Tuple\n\ndef solution(point1: Tuple[int, int], point2: Tuple[int, int]) -> str:\n \"\"\"\n Determine the relationship between two points based on their layers.\n \n Parameters:\n point1 (Tuple[int, int]): The coordinates of the first point, where both...
q11-2
[{"role": "user", "question": "from typing import Tuple\n\ndef solution(point1: Tuple[int, int], point2: Tuple[int, int]) -> str:\n \"\"\"\n Determine the relationship between two points based on their layers.\n \n Parameters:\n point1 (Tuple[int, int]): The coordinates of the first point, where both...
q11-3
[{"role": "user", "question": "from typing import Tuple\n\ndef solution(point1: Tuple[int, int], point2: Tuple[int, int]) -> str:\n \"\"\"\n Determine the relationship between two points based on their layers.\n \n Parameters:\n point1 (Tuple[int, int]): The coordinates of the first point, where both...
q12
[{"role": "user", "question": "from typing import List\n\ndef solution(input_matrix: List[List[str]]) -> List[List[str]]:\n \"\"\"\n Transform the input matrix based on the pattern shown in the figure\n \n Parameters:\n input_matrix (List[List[str]]): Input matrix as a 2d array.\n \n Returns:\n...
q12-2
[{"role": "user", "question": "from typing import List\n\ndef solution(input_matrix: List[List[str]]) -> List[List[str]]:\n \"\"\"\n Transform the input matrix based on the pattern shown in the figure\n \n Parameters:\n input_matrix (List[List[str]]): Input matrix as a 2d array.\n \n Returns:\n...
q12-3
[{"role": "user", "question": "from typing import List\n\ndef solution(input_matrix: List[List[str]]) -> List[List[str]]:\n \"\"\"\n Transform the input matrix based on the pattern shown in the figure\n \n Parameters:\n input_matrix (List[List[str]]): Input matrix as a 2d array.\n \n Returns:\n...
q13
[{"role": "user", "question": "def solution(nodes: dict, edges: list, start: str, end: str) -> int:\n \"\"\"\n Given the nodes and edges of a graph, determine the minimum path cost from a given starting node to an ending node.\n Please observe the example graph in the image to deduce the pattern calculating th...
q13-2
[{"role": "user", "question": "def solution(nodes: dict, edges: list, start: str, end: str) -> int:\n \"\"\"\n Given the nodes and edges of a graph, determine the minimum path cost from a given starting node to an ending node.\n Please observe the example graph in the image to deduce the pattern calculating th...
q13-3
[{"role": "user", "question": "def solution(nodes: dict, edges: list, start: str, end: str) -> int:\n \"\"\"\n Given the nodes and edges of a graph, determine the minimum path cost from a given starting node to an ending node.\n Please observe the example graph in the image to deduce the pattern calculating th...
q14
[{"role": "user", "question": "def solution(start: tuple[int, int], target: tuple[int, int], direction: tuple[int, int]) -> bool:\n \"\"\"\n Determines whether the ball can reach the target.\n\n Parameters:\n - start: Tuple[int, int], represents the initial position of the ball (x, y).\n - target: Tuple[...
q14-2
[{"role": "user", "question": "def solution(start_1: tuple[int, int], start_2: tuple[int, int], direction_1: tuple[int, int], direction_2: tuple[int, int]) -> bool:\n \"\"\"\n Determines whether the two balls will collide.\n\n Parameters:\n - start_1: Tuple[int, int], represents the initial position of ball...
q14-3
[{"role": "user", "question": "def solution(start: tuple[int, int], direction: tuple[int, int]) -> bool:\n \"\"\"\n Determines whether the ball can go into the hole\n\n Parameters:\n - start: Tuple[int, int], represents the initial position of the ball (x, y).\n - direction: Tuple[int, int], represents t...
q15
[{"role": "user", "question": "def solution(end_time: int) -> int:\n \"\"\"\n Calculate how many layers of cups have been full-filled by the given end time.\n\n Input:\n - end_time: the given end time.\n\n Output:\n - the total numbers of full-filled layers.\n \"\"\"\n", "answer": "def solution(end...
q16
[{"role": "user", "question": "def solution(grid: list[int]) -> int:\n \"\"\"\n Calculate the number of communities according to the image.\n\n Input:\n - grid: A list representing the initial grid, each str element is a row of the grid. The 'x' indicates a gray square and '.' indicates a white square.\n\n ...
q17
[{"role": "user", "question": "def solution(matrix: list[list[int]]) -> list[list[int]]:\n \"\"\"\n Refer to the example cases illustrated in the figure, identify and implement the pooling operation on the matrix.\n\n Input:\n - matrix: A 2d list representing the initial matrix. For example, [[1,3,4,2], [2,...
q17-2
[{"role": "user", "question": "def solution(matrix: list[list[int]]) -> list[list[int]]:\n \"\"\"\n Refer to the example cases illustrated in the figure, identify and implement the pooling operation on the matrix.\n\n Input:\n - matrix: A 2d list representing the initial matrix. For example, [[1,3,4,2], [2,...
q17-3
[{"role": "user", "question": "def solution(matrix: list[list[int]]) -> list[list[int]]:\n \"\"\"\n Refer to the example cases illustrated in the figure, identify and implement the pooling operation on the matrix.\n\n Input:\n - matrix: A 2d list representing the initial matrix. For example, [[1,3,4], [2,1,...
q18
[{"role": "user", "question": "from typing import List\n\n\ndef solution(matrix: List[List[int]]) -> List[int]:\n \"\"\"\n Given an M x N 2D matrix, traverse the matrix according to the spiral pattern shown in the figure\n\n Parameters:\n matrix (List[List[int]]): A 2D list of integers representing the matr...
q18-2
[{"role": "user", "question": "from typing import List\n\n\ndef solution(matrix: List[List[int]]) -> List[int]:\n \"\"\"\n Given an M x N 2D matrix, traverse the matrix according to the spiral pattern shown in the figure\n\n Parameters:\n matrix (List[List[int]]): A 2D list of integers representing the matr...
q18-3
[{"role": "user", "question": "from typing import List\n\n\ndef solution(matrix: List[List[int]]) -> List[int]:\n \"\"\"\n Given an M x N 2D matrix, traverse the matrix according to the spiral pattern shown in the figure\n\n Parameters:\n matrix (List[List[int]]): A 2D list of integers representing the matr...
q19
[{"role": "user", "question": "\ndef solution(dragon_life: float, player_life: float, dragon_attack_point: float, player_attack_point: float) -> int:\n \"\"\"\n Build the dragon slaying game as shown in the diagram, and calculate how many life points the winner has left.\n\n Parameters:\n dragon_life (f...
q19-2
[{"role": "user", "question": "\ndef solution(dragon_life: float, player_life: float, dragon_attack_point: float, player_attack_point: float) -> int:\n \"\"\"\n Build the dragon slaying game as shown in the diagram, and calculate how many life points the winner has left.\n\n Parameters:\n dragon_life (f...
q19-3
[{"role": "user", "question": "\ndef solution(dragon_life: float, player_life: float, dragon_attack_point: float, player_attack_point: float) -> int:\n \"\"\"\n Build the dragon slaying game as shown in the diagram, and calculate how many life points the winner has left.\n\n Parameters:\n dragon_life (f...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
35