messages
listlengths
3
3
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef make_a_pile(n):\n \"\"\"\n Given a positive integ...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef words_string(s):\n \"\"\"\n You will be given a s...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef choose_num(x, y):\n \"\"\"This function takes two po...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef rounded_avg(n, m):\n \"\"\"You are given two positiv...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef unique_digits(x):\n \"\"\"Given a list of positive i...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef by_length(arr):\n \"\"\"\n Given an array of inte...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef f(n):\n \"\"\" Implement the function f that takes n...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef even_odd_palindrome(n):\n \"\"\"\n Given a positi...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef count_nums(arr):\n \"\"\"\n Write a function coun...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef move_one_ball(arr):\n \"\"\"We have an array 'arr' o...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef exchange(lst1, lst2):\n \"\"\"In this problem, you w...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef histogram(test):\n \"\"\"Given a string representing...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef reverse_delete(s,c):\n \"\"\"Task\n We are given ...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef odd_count(lst):\n \"\"\"Given a list of strings, whe...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef minSubArraySum(nums):\n \"\"\"\n Given an array o...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef max_fill(grid, capacity):\n import math\n \"\"\"\...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef sort_array(arr):\n \"\"\"\n In this Kata, you hav...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef select_words(s, n):\n \"\"\"Given a string s and a n...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef get_closest_vowel(word):\n \"\"\"You are given a wor...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef match_parens(lst):\n '''\n You are given a list o...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef maximum(arr, k):\n \"\"\"\n Given an array arr of...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef solution(lst):\n \"\"\"Given a non-empty list of int...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef add_elements(arr, k):\n \"\"\"\n Given a non-empt...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef get_odd_collatz(n):\n \"\"\"\n Given a positive i...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef valid_date(date):\n \"\"\"You have to write a functi...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef split_words(txt):\n '''\n Given a string of words...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef is_sorted(lst):\n '''\n Given a list of numbers, ...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef intersection(interval1, interval2):\n \"\"\"You are ...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef prod_signs(arr):\n \"\"\"\n You are given an arra...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef minPath(grid, k):\n \"\"\"\n Given a grid with N ...
[ { "content": "\nComplete the given code snippet under the CODE field based on its function signature and examples. You may use the additional context given in the CONTEXT field if required.\n", "role": "system" }, { "content": "\nCODE:\n\n\ndef tri(n):\n \"\"\"Everyone knows Fibonacci sequence, i...