id stringlengths 45 74 | content stringlengths 523 7.62k |
|---|---|
multipl-e_humaneval-java_data_HumanEval_104_unique_digits | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given an array array list of positive integers x. return a sorted array list of all
// elements that hasn't any even digit.
//... |
multipl-e_humaneval-java_data_HumanEval_105_by_length | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given an array array list of integers, sort the integers that are between 1 and 9 inclusive,
// reverse the resulting array array l... |
multipl-e_humaneval-java_data_HumanEval_106_f | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Implement the function f that takes n as a parameter,
// and returns an array array list of size n, such that the value of the elem... |
multipl-e_humaneval-java_data_HumanEval_107_even_odd_palindrome | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a positive integer n, return a pair that has the number of even and odd
// integer palindromes that fall within the range(1, ... |
multipl-e_humaneval-java_data_HumanEval_108_count_nums | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Write a function count_nums which takes an array array list of integers and returns
// the number of elements which has a sum of di... |
multipl-e_humaneval-java_data_HumanEval_109_move_one_ball | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// We have an array array list 'arr' of N integers arr[1], arr[2], ..., arr[N].The
// numbers in the array array list will be randomly... |
multipl-e_humaneval-java_data_HumanEval_110_exchange | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// In this problem, you will implement a function that takes two array lists of numbers,
// and determines whether it is possible to p... |
multipl-e_humaneval-java_data_HumanEval_111_histogram | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a string representing a space separated lowercase letters, return a hash map
// of the letter with the most repetition and co... |
multipl-e_humaneval-java_data_HumanEval_112_reverse_delete | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Task
// We are given two strings s and c, you have to deleted all the characters in s that are equal to any character in c
// t... |
multipl-e_humaneval-java_data_HumanEval_113_odd_count | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given an array array list of strings, where each string consists of only digits, return an array array list.
// Each element i of t... |
multipl-e_humaneval-java_data_HumanEval_114_minSubArraySum | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given an array array list of integers nums, find the minimum sum of any non-empty sub-array array list
// of nums.
// Example
... |
multipl-e_humaneval-java_data_HumanEval_115_max_fill | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You are given a rectangular grid of wells. Each row represents a single well,
// and each 1 in a row represents a single unit of wa... |
multipl-e_humaneval-java_data_HumanEval_116_sort_array | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// In this Kata, you have to sort an array array list of non-negative integers according to
// number of ones in their binary represen... |
multipl-e_humaneval-java_data_HumanEval_117_select_words | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a string s and a natural number n, you have been tasked to implement
// a function that returns an array array list of all w... |
multipl-e_humaneval-java_data_HumanEval_118_get_closest_vowel | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You are given a word. Your task is to find the closest vowel that stands between
// two consonants from the right side of the word... |
multipl-e_humaneval-java_data_HumanEval_119_match_parens | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You are given an array array list of two strings, both strings consist of open
// parentheses '(' or close parentheses ')' only.
... |
multipl-e_humaneval-java_data_HumanEval_120_maximum | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given an array array list arr of integers and a positive integer k, return a sorted array list
// of length k with the maximum k n... |
multipl-e_humaneval-java_data_HumanEval_121_solution | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a non-empty array list of integers, return the sum of all of the odd elements that are in even positions.
// Examples
// ... |
multipl-e_humaneval-java_data_HumanEval_122_add_elements | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a non-empty array array list of integers arr and an integer k, return
// the sum of the elements with at most two digits from... |
multipl-e_humaneval-java_data_HumanEval_123_get_odd_collatz | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a positive integer n, return a sorted array list that has the odd numbers in collatz sequence.
// The Collatz conjecture is a... |
multipl-e_humaneval-java_data_HumanEval_124_valid_date | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You have to write a function which validates a given date string and
// returns true if the date is valid otherwise false.
// T... |
multipl-e_humaneval-java_data_HumanEval_126_is_sorted | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given an array array list of numbers, return whether or not they are sorted
// in ascending order. If array list has more than 1 du... |
multipl-e_humaneval-java_data_HumanEval_127_intersection | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You are given two intervals,
// where each interval is a pair of integers. For example, interval = (start, end) = (1, 2).
// Th... |
multipl-e_humaneval-java_data_HumanEval_128_prod_signs | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You are given an array array list arr of integers and you need to return
// sum of magnitudes of integers multiplied by product of ... |
multipl-e_humaneval-java_data_HumanEval_129_minPath | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a grid with N rows and N columns (N >= 2) and a positive integer k,
// each cell of the grid contains a value. Every integer... |
multipl-e_humaneval-java_data_HumanEval_130_tri | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Everyone knows Fibonacci sequence, it was studied deeply by mathematicians in
// the last couple centuries. However, what people d... |
multipl-e_humaneval-java_data_HumanEval_131_digits | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a positive integer n, return the product of the odd digits.
// Return 0 if all digits are even.
// For example:
// >>... |
multipl-e_humaneval-java_data_HumanEval_132_is_nested | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Create a function that takes a string as input which contains only square brackets.
// The function should return true if and only ... |
multipl-e_humaneval-java_data_HumanEval_133_sum_squares | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You are given an array array list of numbers.
// You need to return the sum of squared numbers in the given array list,
// roun... |
multipl-e_humaneval-java_data_HumanEval_134_check_if_last_char_is_a_letter | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Create a function that returns true if the last character
// of a given string is an alphabetical character and is not
// a par... |
multipl-e_humaneval-java_data_HumanEval_135_can_arrange | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Create a function which returns the largest index of an element which
// is not greater than or equal to the element immediately pr... |
multipl-e_humaneval-java_data_HumanEval_136_largest_smallest_integers | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Create a function that returns a pair (a, b), where 'a' is
// the largest of negative integers, and 'b' is the smallest
// of p... |
multipl-e_humaneval-java_data_HumanEval_138_is_equal_to_sum_even | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Evaluate whether the given number n can be written as the sum of exactly 4 positive even numbers
// Example
// >>> isEqualToSum... |
multipl-e_humaneval-java_data_HumanEval_139_special_factorial | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// The Brazilian factorial is defined as:
// brazilian_factorial(n) = n! * (n-1)! * (n-2)! * ... * 1!
// where n > 0
// For ex... |
multipl-e_humaneval-java_data_HumanEval_140_fix_spaces | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a string text, replace all spaces in it with underscores,
// and if a string has more than 2 consecutive spaces,
// the... |
multipl-e_humaneval-java_data_HumanEval_141_file_name_check | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Create a function which takes a string representing a file's name, and returns
// 'Yes' if the the file's name is valid, and return... |
multipl-e_humaneval-java_data_HumanEval_142_sum_squares | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// "
// This function will take an array array list of integers. For all entries in the array list, the function shall square the inte... |
multipl-e_humaneval-java_data_HumanEval_143_words_in_sentence | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You are given a string representing a sentence,
// the sentence contains some words separated by a space,
// and you have to re... |
multipl-e_humaneval-java_data_HumanEval_144_simplify | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Your task is to implement a function that will simplify the expression
// x * n. The function returns true if x * n evaluates to a ... |
multipl-e_humaneval-java_data_HumanEval_145_order_by_points | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Write a function which sorts the given array list of integers
// in ascending order according to the sum of their digits.
// No... |
multipl-e_humaneval-java_data_HumanEval_146_specialFilter | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Write a function that takes an array array list of numbers as input and returns
// the number of elements in the array array list ... |
multipl-e_humaneval-java_data_HumanEval_147_get_max_triples | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You are given a positive integer n. You have to create an integer array array list a of length n.
// For each i (1 ≤ i ≤ n), the va... |
multipl-e_humaneval-java_data_HumanEval_148_bf | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// There are eight planets in our solar system: the closerst to the Sun
// is Mercury, the next one is Venus, then Earth, Mars, Jupit... |
multipl-e_humaneval-java_data_HumanEval_149_sorted_list_sum | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Write a function that accepts an array array list of strings as a parameter,
// deletes the strings that have odd lengths from it,
... |
multipl-e_humaneval-java_data_HumanEval_150_x_or_y | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// A simple program which should return the value of x if n is
// a prime number and should return the value of y otherwise.
// E... |
multipl-e_humaneval-java_data_HumanEval_151_double_the_difference | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given an array array list of numbers, return the sum of squares of the numbers
// in the array list that are odd. Ignore numbers th... |
multipl-e_humaneval-java_data_HumanEval_152_compare | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// I think we all remember that feeling when the result of some long-awaited
// event is finally known. The feelings and thoughts you ... |
multipl-e_humaneval-java_data_HumanEval_153_Strongest_Extension | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You will be given the name of a class (a string) and an array array list of extensions.
// The extensions are to be used to load ad... |
multipl-e_humaneval-java_data_HumanEval_154_cycpattern_check | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You are given 2 words. You need to return true if the second word or any of its rotations is a substring in the first word
// >>> c... |
multipl-e_humaneval-java_data_HumanEval_155_even_odd_count | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given an integer. return a pair that has the number of even and odd digits respectively.
// Example:
// >>> evenOddCount((-12l)... |
multipl-e_humaneval-java_data_HumanEval_156_int_to_mini_roman | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a positive integer, obtain its roman numeral equivalent as a string,
// and return it in lowercase.
// Restrictions: 1 <=... |
multipl-e_humaneval-java_data_HumanEval_157_right_angle_triangle | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given the lengths of the three sides of a triangle. Return true if the three
// sides form a right-angled triangle, false otherwise... |
multipl-e_humaneval-java_data_HumanEval_158_find_max | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Write a function that accepts an array array list of strings.
// The array list contains different words. Return the word with maxi... |
multipl-e_humaneval-java_data_HumanEval_159_eat | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You're a hungry rabbit, and you already have eaten a certain number of carrots,
// but now you need to eat more carrots to complete... |
multipl-e_humaneval-java_data_HumanEval_160_do_algebra | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given two array lists operator, and operand. The first array list has basic algebra operations, and
// the second array list is an... |
multipl-e_humaneval-java_data_HumanEval_161_solve | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// You are given a string s.
// if s[i] is a letter, reverse its case from lower to upper or vise versa,
// otherwise keep it as ... |
multipl-e_humaneval-java_data_HumanEval_162_string_to_md5 | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given a string 'text', return its md5 hash equivalent string.
// If 'text' is an empty string, return null.
// >>> stringToMd5(... |
multipl-e_humaneval-java_data_HumanEval_163_generate_integers | import java.util.*;
import java.lang.reflect.*;
import org.javatuples.*;
import java.security.*;
import java.math.*;
import java.io.*;
import java.util.stream.*;
class Problem {
// Given two positive integers a and b, return the even digits between a
// and b, in ascending order.
// For example:
// >>> ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.