conversations listlengths 3 3 |
|---|
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function in Python to find the number of inversions in an array. An inversion is a pair of indices (i, j) such that i < j and arr[i] > arr[j]."
},
{
"from": "gpt",
"... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the square of the sum of the first n natural numbers."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Create a Python function that takes two lists of integers and returns their elements in an alternating order, similar to a 'zigzag' pattern. If one list is longer, continue the pattern ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the first non-repeating character in a given string."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef f... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to calculate the mode of a list of numbers. The mode is the number that appears most frequently in a data set."
},
{
"from": "gpt",
"value": "Here is the co... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the maximum number of non-overlapping segments of length 2 such that the sum of the elements in each segment is positive."
},
{
"from": "gpt",
... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to check if a given string contains any repeating characters."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to create a list of tuples where each tuple contains the index and the square of each number in the given list."
},
{
"from": "gpt",
"value": "Here is the c... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that takes a list of strings as input and returns a list of all substrings of each string in the list."
},
{
"from": "gpt",
"value": "Here is the code to so... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the third largest number in a list. If the list doesn't contain enough unique numbers, the function should return None."
},
{
"from": "gpt",
... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function that takes a list of integers and returns the maximum number of times the smallest element in the list is repeated."
},
{
"from": "gpt",
"value": "He... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the kth smallest element in an unsorted array using a Min Heap."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ni... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the indexes of the first and last occurrence of a given number in a sorted array."
},
{
"from": "gpt",
"value": "Here is the code to solve this prob... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to calculate the number of candies each child gets when distributing candies evenly among them."
},
{
"from": "gpt",
"value": "Here is the code to so... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to calculate the factorial of a number using dynamic programming approach."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n``... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the first unique character in a given string and return its index. If no unique character is found, return -1."
},
{
"from": "gpt",
"value": ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that takes a list of integers and returns a new list where all elements are shifted left by one position, and the first element of the input list becomes the last eleme... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Create a Python function that takes a list of integers and returns a tuple. The first element of the tuple should be the sum of the squares of the positive numbers in the list. The seco... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to return the maximum sum of non-adjacent elements in a given list of integers. This problem is known as the \"House Robber\" problem, where a robber plans to loot hous... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the second largest number in a given list of numbers."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to count the frequency of each word in a given string."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef wordFrequency(... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Given a string that contains the title of a book in a library, return the ISBN number of the book. The title and ISBN number are separated by '-'. Assume that the ISBN number is always ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the nth non-square number.\n\nA non-square number is an integer that is not the square of any integer.\n\nFor example, the first few non-square numbers a... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function that takes a list of lists representing a matrix, and two positive integers r and c, and returns a new matrix reshaped to the dimensions r x c. If the reshape op... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that finds the longest substring without repeating characters in a given string."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function that uses binary search to find a square root of a number."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef Squ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that takes a list of integers as input and returns the number of positive, negative, and zero values in the list."
},
{
"from": "gpt",
"value": "Here is the... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that takes a string as input and returns a dictionary where the keys are the characters from the string, and the values are the counts of the occurrences of each charac... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to count the number of strings where the string length is 2 or more and the first and last character are same from a given list of strings."
},
{
"from":... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that takes a list of tuples, where each tuple represents a person's name and age, and returns a dictionary where the keys are the first letters of the names and the val... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the intersection of two sorted arrays."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef intersect_sorted_array... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the number of times a given string is found in a list of strings."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the maximum length of a substring in a given string where all characters are the same."
},
{
"from": "gpt",
"value": "Here is the code to sol... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that checks if a given string can be decoded from its abbreviation. The abbreviation can have digits representing the number of characters to skip, and letters to keep.... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find if there exists a duplicate number in an array such that the two indices of the duplicate numbers are at most k units apart."
},
{
"from": "gpt",
"v... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the sum of all the digits of a decimal number until the sum becomes a single digit."
},
{
"from": "gpt",
"value": "Here is the code to solve this pr... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the common unique elements between two lists."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef find_com... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the smallest common multiple (SCM) of two given numbers."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\nd... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the smallest positive number that is evenly divisible (no remainder) by all of the numbers from 1 to n."
},
{
"from": "gpt",
"value": "Here i... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to generate a list of prime numbers up to a given limit using the Sieve of Eratosthenes algorithm."
},
{
"from": "gpt",
"value": "Here is the code to... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the largest island of similar items in a given matrix. An island is defined as a group of similar items connected horizontally or vertically."
},
{
"fro... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that determines if a given string can be partitioned into three substrings that are all palindromes."
},
{
"from": "gpt",
"value": "Here is the code to solv... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a Python program to match a string that contains only uppercase letters, lowercase letters, numeric digits, and underscores."
},
{
"from": "gpt",
"value": "Here is the... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the largest substring without repeating characters in a given string."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the kth smallest number in a list using QuickSelect algorithm."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\nim... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to reverse the order of the characters in each word within a sentence while still preserving whitespace and initial word order."
},
{
"from": "gpt",
"value"... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the number of prime numbers in a given list of integers."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\nd... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the two largest numbers in a list."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef largestTwo(arr):\n ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function that takes a list of integers and returns a new list with the odd numbers replaced by their square and the even numbers replaced by their cube."
},
{
"fr... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that converts a list of strings representing numbers into a list of integers."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```pyt... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the smallest power of 2 that is greater than or equal to the given number."
},
{
"from": "gpt",
"value": "Here is the code to solve this prob... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the longest substring without repeating characters in a given string."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to check whether two strings are almost equal. Two strings are almost equal if you can insert, delete, or replace a single character in one of the strings to make them ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the number of ways to reach the top of a staircase with a given number of steps, where you can climb either 1 or 2 steps at a time."
},
{
"from":... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to return the first repeating element in an array. If there is no repeating element, return -1."
},
{
"from": "gpt",
"value": "Here is the code to so... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the median of a list of numbers using a heap."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\nimport heapq\n\ndef... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Create a python function that takes a string input and returns a new string that contains only the characters that are in the odd positions of the input string.\n\nWrite a function call... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that determines if a given set of stones can be removed according to the game rule. The game rule is that stones can be removed if there are at least two stones in the ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to maximize the number of courses that can be completed. Each course has a duration and a deadline. A course can only be taken if it's duration does not exceed the rema... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the number of balanced parentheses in a given string. A balanced parentheses string is a string where every opening parentheses '(' has a corresponding c... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to concatenate two tuples into a new tuple."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef concatenate_tuples(tup1, ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that takes a list of numbers as input and returns a new list with the numbers sorted in ascending order using a merge sort algorithm."
},
{
"from": "gpt",
"... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the number of wonderful substrings of a given string. A wonderful substring is defined as a substring with at most one character having an odd frequency, and al... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Create a function that takes an integer n and returns the nth Fibonacci number. Then, create a second function that takes two integers x and y, and returns the sum of the xth and yth Fi... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that takes in a list of strings and returns the string with the most vowels. In case of a tie, return the string that appears first in the list."
},
{
"from": "... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the number of times a target value appears in a 2D matrix."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef co... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to check if an array contains a cycle of odd numbers. A cycle of odd numbers is defined as a sequence of odd numbers that can loop back to the start. The function shoul... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the minimum number of rabbits that could be in the forest given the information that some subset of rabbits tell you how many other rabbits have the same... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that takes a list of tuples, where each tuple contains a person's name and their scores in different subjects. The function should return the name of the person with th... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the number of ways a given string can be partitioned such that each partition is a palindrome."
},
{
"from": "gpt",
"value": "Here is the cod... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the nearest smaller element for each element in a given list of integers. The function should return a list where each element is the nearest smaller element to... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the minimum time required to visit all points on a 2D plane from a given starting point. You are given a list of points on the X-Y plane, and you need to visit ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to check if two strings are close to each other. Two strings are considered close if you can swap any two characters in one of the strings an unlimited number of... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the number of valid triangles that can be formed from a given list of stick lengths. A valid triangle is formed when the sum of the lengths of any two sides is ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the largest permutation of a number that is less than or equal to a given number."
},
{
"from": "gpt",
"value": "Here is the code to solve th... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the smallest missing positive integer from a given unsorted integer array."
},
{
"from": "gpt",
"value": "Here is the code to solve this prob... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the sum of all even Fibonacci numbers up to a given limit."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef su... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the Length of the longest balanced subsequence in a given binary string. A balanced subsequence is a subsequence in which the number of '0's and '1's are... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the lucky numbers in the given matrix. A lucky number is defined as the element which is the minimum in its row and maximum in its column."
},
{
"from":... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the minimum difference possible from the sum of numbers in a given array by partitioning it into two subsets."
},
{
"from": "gpt",
"value": "... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the number of occurrences of a given substring in a string, where overlapping substrings are also counted."
},
{
"from": "gpt",
"value": "Her... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the kth missing positive integer from a sorted list of distinct positive integers."
},
{
"from": "gpt",
"value": "Here is the code to solve t... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the minimum edit distance between two strings. The edit distance is the minimum number of operations required to transform one string into another. The allowed ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that takes a list of integers and returns the index of the first non-negative number."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to generate the next permutation of a given list of integers. If the next permutation is not possible, return the lowest possible order (i.e., sorted in ascendin... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a Python function that takes a list of numbers and returns the mean of the numbers in the list."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function that takes a list of integers as input and returns the product of all the elements in the list that are smaller than the maximum element in the list."
},
{
... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to check if a given list of numbers contains a consecutive sequence."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function named `isSymmetric` that takes a list of integers and checks whether the list is symmetric. A symmetric list is a list that reads the same backward as forward."
... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function that takes an integer n and a positive integer k and returns the k-th permutation sequence of numbers from 1 to n."
},
{
"from": "gpt",
"value": "Here is th... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the total cost of hiring k workers from a list of candidates. The function should take in a list of integers representing the cost of each candidate, an ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Implement a function that takes a string and a target character, then removes all occurrences of the target character from the string."
},
{
"from": "gpt",
"value": "Here is... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the maximum number of palindromic substrings that can be made from a given string by deleting characters. The function should return the count of such palindrom... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function that takes a list of numbers and returns a list of all possible sublists from that list."
},
{
"from": "gpt",
"value": "Here is the code to solve thi... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a function to find the length of the longest subsequence of consecutive integers in the given unsorted array."
},
{
"from": "gpt",
"value": "Here is the code to solve ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function that takes in a list of integers and returns a new list where each element is replaced by its cube. The function should also sort the new list in ascending order... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the largest prime factor of a given number."
},
{
"from": "gpt",
"value": "Here is the code to solve this problem:\n```python\ndef find_Large... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to find the number of possible routes from a starting location to a finish location with a given amount of fuel. The function should take in three parameters: a ... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a Python function that checks if a given list of integers contains a triplet whose sum is equal to a given target sum. The function should return True if such a triplet exists, an... |
[
{
"from": "system",
"value": "You are an assistant that responds to the user."
},
{
"from": "human",
"value": "Write a python function to check if a given array can be split into two parts such that the sum of elements in both parts is equal."
},
{
"from": "gpt",
"value": "Here is th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.