id stringlengths 37 65 | content stringlengths 450 3.71k |
|---|---|
multipl-e_mbpp-java_data_mbpp_638_wind_chill | 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 to calculate the wind chill index rounded to the next integer given the wind velocity in km/h and a temperature in cel... |
multipl-e_mbpp-java_data_mbpp_639_sample_nam | 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 to sum the length of the names of a given array list of names after removing the names that start with a lowercase let... |
multipl-e_mbpp-java_data_mbpp_640_remove_parenthesis | 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 to remove the parenthesis and what is inbetween them from a string.
public static String removeParenthesis(ArrayLi... |
multipl-e_mbpp-java_data_mbpp_641_is_nonagonal | 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 to find the nth nonagonal number.
public static long isNonagonal(long n) {
}
public static void main(Str... |
multipl-e_mbpp-java_data_mbpp_643_text_match_wordz_middle | 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 checks if a strings contains 'z', except at the start and end of the word.
public static boolean textMatchWor... |
multipl-e_mbpp-java_data_mbpp_644_reverse_Array_Upto_K | 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 javathon function to reverse an array array list upto a given position.
public static ArrayList<Long> reverseArrayUptoK(Arr... |
multipl-e_mbpp-java_data_mbpp_720_add_dict_to_tuple | 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 to add a hash map to the pair. The output should be a pair.
public static Pair<Long, Long, Long, HashMap<String,Lo... |
multipl-e_mbpp-java_data_mbpp_721_maxAverageOfPath | 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 square matrix of size N*N given as an array array list of array lists, where each cell is associated with a specific cost. A pa... |
multipl-e_mbpp-java_data_mbpp_722_filter_data | 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 input is given as - a hash map with a student name as a key and a pair of float (student_height, student_weight) as a value, - mini... |
multipl-e_mbpp-java_data_mbpp_723_count_same_pair | 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 input is defined as two array lists of the same length. Write a function to count indices where the array lists have the same value... |
multipl-e_mbpp-java_data_mbpp_724_power_base_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 takes base and power as arguments and calculate the sum of all digits of the base to the specified power.
pub... |
multipl-e_mbpp-java_data_mbpp_725_extract_quotation | 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 to extract values between quotation marks " " of the given string.
public static ArrayList<Object> extractQuotatio... |
multipl-e_mbpp-java_data_mbpp_726_multiply_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 {
// Write a function that takes as input an array array list of numbers (t_1,...,t_{N+1}) and returns an array array list of length N where... |
multipl-e_mbpp-java_data_mbpp_728_sum_list | 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 takes as input two array lists [a_1,...,a_n], [b_1,...,b_n] and returns [a_1+b_1,...,a_n+b_n].
public static Array... |
multipl-e_mbpp-java_data_mbpp_730_consecutive_duplicates | 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 to remove consecutive duplicates of a given array list.
public static ArrayList<Object> consecutiveDuplicates(Arra... |
multipl-e_mbpp-java_data_mbpp_731_lateralsurface_cone | 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 to find the lateral surface area of a cone given radius r and the height h.
public static float lateralsurfaceCone... |
multipl-e_mbpp-java_data_mbpp_732_replace_specialchar | 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 to replace all occurrences of spaces, commas, or dots with a colon.
public static String replaceSpecialchar(String... |
multipl-e_mbpp-java_data_mbpp_733_find_first_occurrence | 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 to find the index of the first occurrence of a given number in a sorted array array list.
public static long findF... |
multipl-e_mbpp-java_data_mbpp_734_sum_Of_Subarray_Prod | 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 javathon function to find sum of products of all possible subarray lists of a given array list. https://www.geeksforgeeks.org/s... |
multipl-e_mbpp-java_data_mbpp_735_toggle_middle_bits | 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 javathon function to toggle bits of the number except the first and the last bit. https://www.geeksforgeeks.org/toggle-bits-num... |
multipl-e_mbpp-java_data_mbpp_736_left_insertion | 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 to locate the left insertion point for a specified value in sorted order. https://www.w3resource.com/javathon-exercise... |
multipl-e_mbpp-java_data_mbpp_737_check_str | 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 to check whether the given string is starting with a vowel or not using regex.
public static boolean checkStr(Stri... |
multipl-e_mbpp-java_data_mbpp_738_geometric_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 to calculate the geometric sum of n-1. https://www.w3resource.com/javathon-exercises/data-structures-and-algorithms/ja... |
multipl-e_mbpp-java_data_mbpp_739_find_Index | 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 javathon function to find the index of smallest triangular number with n digits. https://www.geeksforgeeks.org/index-of-smalles... |
multipl-e_mbpp-java_data_mbpp_740_tuple_to_dict | 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 to convert the given pair to a key-value hash map using adjacent elements. https://www.geeksforgeeks.org/javathon-conv... |
multipl-e_mbpp-java_data_mbpp_741_all_Characters_Same | 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 javathon function to check whether all the characters are same or not.
public static boolean allCharactersSame(String s) {
... |
multipl-e_mbpp-java_data_mbpp_742_area_tetrahedron | 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 to caluclate the area of a tetrahedron.
public static float areaTetrahedron(long side) {
}
public static... |
multipl-e_mbpp-java_data_mbpp_743_rotate_right | 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 to rotate a given array list by specified number of items to the right direction. https://www.geeksforgeeks.org/javath... |
multipl-e_mbpp-java_data_mbpp_744_check_none | 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 to check if the given pair has any none value or not.
public static boolean checkNone(Object test_tup) {
}
... |
multipl-e_mbpp-java_data_mbpp_745_divisible_by_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 {
// Write a function to find numbers within a given range from startnum ti endnum where every number is divisible by every digit it contain... |
multipl-e_mbpp-java_data_mbpp_746_sector_area | 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 to find area of a sector. The function takes the radius and angle as inputs. Function should return null if the angle ... |
multipl-e_mbpp-java_data_mbpp_747_lcs_of_three | 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 to find the longest common subsequence for the given three string sequence. https://www.geeksforgeeks.org/lcs-longest-... |
multipl-e_mbpp-java_data_mbpp_748_capital_words_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 {
// Write a function to put spaces between words starting with capital letters in a given string.
public static String capitalWordsSpac... |
multipl-e_mbpp-java_data_mbpp_749_sort_numeric_strings | 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 to sort a given array list of strings of numbers numerically. https://www.geeksforgeeks.org/javathon-sort-numeric-stri... |
multipl-e_mbpp-java_data_mbpp_750_add_tuple | 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 to add the given pair to the given array list.
public static ArrayList<Long> addTuple(ArrayList<Long> test_list, P... |
multipl-e_mbpp-java_data_mbpp_751_check_min_heap | 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 to check if the given array array list represents min heap or not. https://www.geeksforgeeks.org/how-to-check-if-a-giv... |
multipl-e_mbpp-java_data_mbpp_752_jacobsthal_num | 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 to find the nth jacobsthal number. https://www.geeksforgeeks.org/jacobsthal-and-jacobsthal-lucas-numbers/ 0, 1, 1, 3, ... |
multipl-e_mbpp-java_data_mbpp_753_min_k | 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 to find minimum k records from pair array list. https://www.geeksforgeeks.org/javathon-find-minimum-k-records-from-pai... |
multipl-e_mbpp-java_data_mbpp_754_extract_index_list | 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 say that an element is common for array lists l1, l2, l3 if it appears in all three array lists under the same index. Write a functi... |
multipl-e_mbpp-java_data_mbpp_756_text_match_zero_one | 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 matches a string that has an 'a' followed by one or more 'b's. https://www.w3resource.com/javathon-exercises/re/j... |
multipl-e_mbpp-java_data_mbpp_757_count_reverse_pairs | 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 to count the pairs of reverse strings in the given string array list. https://www.geeksforgeeks.org/javathon-program-t... |
multipl-e_mbpp-java_data_mbpp_759_is_decimal | 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 to check whether a given string is a decimal number with a precision of 2.
public static boolean isDecimal(String ... |
multipl-e_mbpp-java_data_mbpp_760_unique_Element | 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 javathon function to check whether an array array list of numbers contains only one distinct element or not.
public static ... |
multipl-e_mbpp-java_data_mbpp_762_check_monthnumber_number | 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 to check whether the given month number contains 30 days or not. Months are given as number from 1 to 12.
public s... |
multipl-e_mbpp-java_data_mbpp_763_find_min_diff | 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 javathon function to find the minimum difference between any two elements in a given array array list. https://www.geeksforgeek... |
multipl-e_mbpp-java_data_mbpp_764_number_ctr | 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 javathon function to count number of digits in a given string.
public static long numberCtr(String str) {
}
publi... |
multipl-e_mbpp-java_data_mbpp_765_is_polite | 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 to find nth polite number. geeksforgeeks.org/n-th-polite-number/
public static long isPolite(long n) {
}
... |
multipl-e_mbpp-java_data_mbpp_766_pair_wise | 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 to return an array array list of all pairs of consecutive items in a given array list.
public static ArrayList<Pai... |
multipl-e_mbpp-java_data_mbpp_767_get_pairs_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 {
// Write a javathon function to count the number of pairs whose sum is equal to ‘sum’. The funtion gets as input an array array list of nu... |
multipl-e_mbpp-java_data_mbpp_769_Diff | 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 javathon function to get the difference between two array lists.
public static ArrayList<Long> Diff(ArrayList<Long> li1, Ar... |
multipl-e_mbpp-java_data_mbpp_770_odd_num_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 javathon function to find the sum of fourth power of first n odd natural numbers.
public static long oddNumSum(long n) {
... |
multipl-e_mbpp-java_data_mbpp_771_check_expression | 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 to check if the given expression is balanced or not. https://www.geeksforgeeks.org/check-for-balanced-parentheses-in-a... |
multipl-e_mbpp-java_data_mbpp_772_remove_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 {
// Write a function to remove all the words with k length in the given string.
public static String removeLength(String test_str, long... |
multipl-e_mbpp-java_data_mbpp_773_occurance_substring | 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 to find the occurrence and position of the substrings within a string. Return null if there is no match.
public st... |
multipl-e_mbpp-java_data_mbpp_775_odd_position | 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 javathon function to check whether every odd index contains odd numbers of a given array list.
public static boolean oddPos... |
multipl-e_mbpp-java_data_mbpp_776_count_vowels | 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 to count those characters which have vowels as their neighbors in the given string.
public static long countVowels... |
multipl-e_mbpp-java_data_mbpp_777_find_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 javathon function to find the sum of non-repeated elements in a given array list.
public static long findSum(ArrayList<Long... |
multipl-e_mbpp-java_data_mbpp_778_pack_consecutive_duplicates | 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 to pack consecutive duplicates of a given array list elements into subarray lists.
public static ArrayList<ArrayLi... |
multipl-e_mbpp-java_data_mbpp_780_find_combinations | 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 to find the combinations of sums with pairs in the given pair array list. https://www.geeksforgeeks.org/javathon-combi... |
multipl-e_mbpp-java_data_mbpp_781_count_divisors | 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 javathon function to check whether the count of divisors is even. https://www.w3resource.com/javathon-exercises/basic/javathon-... |
multipl-e_mbpp-java_data_mbpp_782_odd_length_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 javathon function to find the sum of all odd length subarray array lists. https://www.geeksforgeeks.org/sum-of-all-odd-length-s... |
multipl-e_mbpp-java_data_mbpp_783_rgb_to_hsv | 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 to convert rgb color to hsv color. https://www.geeksforgeeks.org/program-change-rgb-color-model-hsv-color-model/
p... |
multipl-e_mbpp-java_data_mbpp_784_mul_even_odd | 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 to find the product of first even and odd number of a given array list.
public static long mulEvenOdd(ArrayList<Lo... |
multipl-e_mbpp-java_data_mbpp_785_tuple_str_int | 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 to convert pair string to integer pair.
public static Pair<Long, Long, Long> tupleStrInt(String test_str) {
... |
multipl-e_mbpp-java_data_mbpp_786_right_insertion | 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 to locate the right insertion point for a specified value in sorted order.
public static long rightInsertion(Array... |
multipl-e_mbpp-java_data_mbpp_787_text_match_three | 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 matches a string that has an a followed by three 'b'.
public static boolean textMatchThree(String text) {
... |
multipl-e_mbpp-java_data_mbpp_788_new_tuple | 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 to create a new pair from the given string and array list.
public static Pair<String, String, String> newTuple(Arr... |
multipl-e_mbpp-java_data_mbpp_790_even_position | 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 javathon function to check whether every even index contains even numbers of a given array list.
public static boolean even... |
multipl-e_mbpp-java_data_mbpp_791_remove_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 {
// Write a function to remove pairs from the given pair.
public static Pair<Long, Long, Long, Long> removeNested(Object test_tup) {
... |
multipl-e_mbpp-java_data_mbpp_792_count_list | 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 javathon function to count the number of array lists in a given number of array lists.
public static long countList(ArrayLi... |
multipl-e_mbpp-java_data_mbpp_793_last | 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 javathon function to find the last position of an element in a sorted array array list.
public static long last(ArrayList<L... |
multipl-e_mbpp-java_data_mbpp_794_text_starta_endb | 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 matches a string that has an 'a' followed by anything, ending in 'b'.
public static boolean textStartaEndb(St... |
multipl-e_mbpp-java_data_mbpp_796_return_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 function to find the sum of all items in the given hash map.
public static long returnSum(HashMap<String,Long> dict) {
... |
multipl-e_mbpp-java_data_mbpp_797_sum_in_range | 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 javathon function to find the sum of all odd natural numbers within the range l and r.
public static long sumInRange(long l... |
multipl-e_mbpp-java_data_mbpp_798__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 javathon function to find the sum of an array array list.
public static long Sum(ArrayList<Long> arr) {
}
public ... |
multipl-e_mbpp-java_data_mbpp_799_left_rotate | 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 to that rotate left bits by d bits a given number. We assume that the number is 32 bit.
public static long leftRot... |
multipl-e_mbpp-java_data_mbpp_800_remove_all_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 {
// Write a function to remove all whitespaces from a string.
public static String removeAllSpaces(String text) {
}
public st... |
multipl-e_mbpp-java_data_mbpp_801_test_three_equal | 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 javathon function to count the number of equal numbers from three given integers.
public static long testThreeEqual(long x,... |
multipl-e_mbpp-java_data_mbpp_802_count_rotation | 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 javathon function to count the number of rotations required to generate a sorted array array list. https://www.geeksforgeeks.or... |
multipl-e_mbpp-java_data_mbpp_803_is_perfect_square | 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 to check whether the given number is a perfect square or not. https://www.geeksforgeeks.org/check-if-given-number-is-p... |
multipl-e_mbpp-java_data_mbpp_804_is_product_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 {
// Write a function to check whether the product of numbers in an array array list is even or not.
public static boolean isProductEven... |
multipl-e_mbpp-java_data_mbpp_805_max_sum_list | 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 returns the array list in an array array list of array lists whose sum of elements is the highest.
public sta... |
multipl-e_mbpp-java_data_mbpp_806_max_run_uppercase | 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 to find maximum run of uppercase characters in the given string.
public static long maxRunUppercase(String test_st... |
multipl-e_mbpp-java_data_mbpp_807_first_odd | 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 javathon function to find the first odd number in a given array list of numbers.
public static long firstOdd(ArrayList<Long... |
multipl-e_mbpp-java_data_mbpp_808_check_K | 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 to check if the given pairs contain the k or not.
public static boolean checkK(ArrayList<Long> test_tup, long K) {... |
multipl-e_mbpp-java_data_mbpp_809_check_smaller | 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 to check if each element of second pair is smaller than its corresponding element in the first pair.
public static... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.