codeparrot/xlcost-text-to-code huggingface dataset:
Make all characters of a string same by minimum number of increments or decrements of ASCII values of characters | Java program for the above approach ; Function to check if all characters of the string can be made the same ; Sort the string ; Calculate ASCII value of the median character ; Stores the minimum number of operations required to make all characters equal ; Traverse the string ; Calculate absolute value of current character and median character ; Print the minimum number of operations required ; Driver Code
import java . io . * ; import java . util . Arrays ; class GFG { static void sameChar ( String S , int N ) { char temp [ ] = S . toCharArray ( ) ; Arrays . sort ( temp ) ; String s = new String ( temp ) ; int mid = s . charAt ( N / 2 ) ; int total_operations = 0 ; for ( int i = 0 ; i < N ; i ++ ) { total_operations += Math . abs ( ( ( s . charAt ( i ) - 0 ) - mid ) ) ; } System . out . print ( total_operations ) ; } public static void main ( String [ ] args ) { String S = " geeks " ; int N = S . length ( ) ; sameChar ( S , N ) ; } }
Maximum score possible from an array with jumps of at most length K | JAVA program for the above approach ; Function to count the maximum score of an index ; Base Case ; If the value for the current index is pre - calculated ; Calculate maximum score for all the steps in the range from i + 1 to i + k ; Score for index ( i + j ) ; Update dp [ i ] and return the maximum value ; Function to get maximum score possible from the array A [ ] ; Array to store memoization ; Initialize dp [ ] with - 1 ; Driver Code
import java . io . * ; import java . math . * ; import java . util . * ; public class GFG { static int maxScore ( int i , int A [ ] , int K , int N , int dp [ ] ) { if ( i >= N - 1 ) return A [ N - 1 ] ; if ( dp [ i ] != - 1 ) return dp [ i ] ; int score = Integer . MIN_VALUE ; for ( int j = 1 ; j <= K ; j ++ ) { score = Math . max ( score , maxScore ( i + j , A , K , N , dp ) ) ; } return dp [ i ] = score + A [ i ] ; } static void getScore ( int A [ ] , int N , int K ) { int dp [ ] = new int [ N ] ; for ( int i = 0 ; i < N ; i ++ ) dp [ i ] = - 1 ; System . out . println ( maxScore ( 0 , A , K , N , dp ) ) ; } public static void main ( String args [ ] ) { int A [ ] = { 100 , - 30 , - 50 , - 15 , - 20 , - 30 } ; int K = 3 ; int N = A . length ; getScore ( A , N , K ) ; } }
Count triplets from an array which can form quadratic equations with real roots | Java program for the above approach ; Function to find count of triplets ( a , b , c ) such that the equations ax ^ 2 + bx + c = 0 has real roots ; Stores count of triplets ( a , b , c ) such that ax ^ 2 + bx + c = 0 has real roots ; Base case ; Generate all possible triplets ( a , b , c ) ; If the coefficient of X ^ 2 and X are equal ; If coefficient of X ^ 2 or x are equal to the constant ; Condition for having real roots ; Driver Code ; Function Call
import java . util . * ; class GFG { static int getCount ( int arr [ ] , int N ) { int count = 0 ; if ( N < 3 ) return 0 ; for ( int b = 0 ; b < N ; b ++ ) { for ( int a = 0 ; a < N ; a ++ ) { if ( a == b ) continue ; for ( int c = 0 ; c < N ; c ++ ) { if ( c == a c == b ) continue ; int d = arr [ b ] * arr [ b ] / 4 ; if ( arr [ a ] * arr <= d ) count ++ ; } } } return count ; } public static void main ( String [ ] args ) { int arr [ ] = { 1 , 2 , 3 , 4 , 5 } ; int N = arr . length ; System . out . print ( getCount ( arr , N ) ) ; } }
Check if all array elements can be reduced to less than X | Java Program to implement the above approach ; Function to check if all array elements can be reduced to less than X or not ; Checks if all array elements are already a X or not ; Traverse every possible pair ; Calculate GCD of two array elements ; If gcd is a 1 ; If gcd is a X , then a pair is present to reduce all array elements to a X ; If no pair is present with gcd is a X ; Function to check if all array elements area X ; Function to calculate gcd of two numbers ; Driver Code
import java . io . * ; import java . util . Arrays ; class GFG { public static boolean findAns ( int [ ] A , int N , int X ) { if ( check ( A , X ) ) { return true ; } for ( int i = 0 ; i < N ; i ++ ) { for ( int j = i + 1 ; j < N ; j ++ ) { int gcd = gcd ( A [ i ] , A [ j ] ) ; if ( gcd != 1 ) { if ( gcd <= X ) { return true ; } } } } return false ; } public static boolean check ( int [ ] A , int X ) { for ( int i = 0 ; i < A . length ; i ++ ) { if ( A [ i ] > X ) { return false ; } } return true ; } public static int gcd ( int a , int b ) { if ( b == 0 ) return a ; return gcd ( b , a % b ) ; } public static void main ( String [ ] args ) { int X = 4 ; int [ ] A = { 2 , 1 , 5 , 3 , 6 } ; int N = 5 ; System . out . println ( findAns ( A , N , X ) ) ; } }
Check if X and Y elements can be selected from two arrays respectively such that the maximum in X is less than the minimum in Y | Java program for the above approach ; Function to check if it is possible to choose X and Y elements from a [ ] and b [ ] such that maximum element among X element is less than minimum element among Y elements ; Check if there are atleast X elements in arr1 [ ] and atleast Y elements in arr2 [ ] ; Sort arrays in ascending order ; Check if ( X - 1 ) - th element in arr1 [ ] is less than from M - Yth element in arr2 [ ] ; Return false ; Driver Code ; Function Call
import java . io . * ; import java . util . * ; class GFG { static String check ( int [ ] a , int [ ] b , int Na , int Nb , int k , int m ) { if ( Na < k Nb < m ) return " No " ; Arrays . sort ( a ) ; Arrays . sort ( b ) ; if ( a [ k - 1 ] < b [ Nb - m ] ) { return " Yes " ; } return " No " ; } public static void main ( String [ ] args ) { int [ ] arr1 = { 1 , 2 , 3 } ; int [ ] arr2 = { 3 , 4 , 5 } ; int N = arr1 . length ; int M = arr2 . length ; int X = 2 , Y = 1 ; System . out . println ( check ( arr1 , arr2 , N , M , X , Y ) ) ; } }
Partition array into two subsets with minimum Bitwise XOR between their maximum and minimum | java program for the above approach ; Function to split the array into two subset such that the Bitwise XOR between the maximum of one subset and minimum of other is minimum ; Sort the array in increasing order ; Calculating the min Bitwise XOR between consecutive elements ; Return the final minimum Bitwise XOR ; Driver Code ; Given array arr [ ] ; Size of array ; Function Call
import java . util . * ; class GFG { static int splitArray ( int arr [ ] , int N ) { Arrays . sort ( arr ) ; int result = Integer . MAX_VALUE ; for ( int i = 1 ; i < N ; i ++ ) { result = Math . min ( result , arr [ i ] - arr [ i - 1 ] ) ; } return result ; } public static void main ( String [ ] args ) { int arr [ ] = { 3 , 1 , 2 , 6 , 4 } ; int N = arr . length ; System . out . print ( splitArray ( arr , N ) ) ; } }
Sort an array by left shifting digits of array elements | Java program for the above approach ; Function to check if an array is sorted in increasing order or not ; Traverse the array ; Function to sort the array by left shifting digits of array elements ; Stores previous array element ; Traverse the array arr [ ] ; Stores current element ; Stores current element in String format ; Left - shift digits of current element in all possible ways ; Left - shift digits of current element by idx ; If temp greater than or equal to prev and temp less than optEle ; Update arr [ i ] ; Update prev ; If arr is in increasing order ; Otherwise ; Driver Code
import java . util . * ; class GFG { static boolean isIncreasing ( int [ ] arr ) { for ( int i = 0 ; i < arr . length - 1 ; i ++ ) { if ( arr [ i ] > arr [ i + 1 ] ) return false ; } return true ; } static int [ ] sortArr ( int [ ] arr ) { int prev = - 1 ; for ( int i = 0 ; i < arr . length ; i ++ ) { int optEle = arr [ i ] ; String strEle = String . valueOf ( arr [ i ] ) ; for ( int idx = 0 ; idx < strEle . length ( ) ; idx ++ ) { String strEle2 = strEle . substring ( idx ) + strEle . substring ( 0 , idx ) ; int temp = Integer . valueOf ( strEle2 ) ; if ( temp >= prev && temp < optEle ) optEle = temp ; } arr [ i ] = optEle ; prev = arr [ i ] ; } if ( isIncreasing ( arr ) ) return arr ; else { return new int [ ] { - 1 } ; } } public static void main ( String [ ] args ) { int [ ] arr = { 511 , 321 , 323 , 432 , 433 } ; int [ ] res = sortArr ( arr ) ; for ( int i = 0 ; i < res . length ; i ++ ) System . out . print ( res [ i ] + " ▁ " ) ; } }
Maximize maximum possible subarray sum of an array by swapping with elements from another array | Java program for the above approach ; Function to find the maximum subarray sum possible by swapping elements from array arr [ ] with that from array brr [ ] ; Stores elements from the arrays arr [ ] and brr [ ] ; Store elements of array arr [ ] and brr [ ] in the vector crr ; Sort the vector crr in descending order ; Stores maximum sum ; Calculate the sum till the last index in crr [ ] which is less than N which contains a positive element ; Print the sum ; Driver code ; Given arrays and respective lengths ; Calculate maximum subarray sum
import java . util . * ; class GFG { static void maxSum ( int arr [ ] , int brr [ ] , int N , int K ) { Vector < Integer > crr = new Vector < Integer > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { crr . add ( arr [ i ] ) ; } for ( int i = 0 ; i < K ; i ++ ) { crr . add ( brr [ i ] ) ; } Collections . sort ( crr ) ; Collections . reverse ( crr ) ; int sum = 0 ; for ( int i = 0 ; i < N ; i ++ ) { if ( crr . get ( i ) > 0 ) { sum += crr . get ( i ) ; } else { break ; } } System . out . println ( sum ) ; } public static void main ( String [ ] args ) { int arr [ ] = { 7 , 2 , - 1 , 4 , 5 } ; int N = arr . length ; int brr [ ] = { 1 , 2 , 3 , 2 } ; int K = brr . length ; maxSum ( arr , brr , N , K ) ; } }
Count pairs with Bitwise XOR greater than both the elements of the pair | Java program for the above approach ; Function that counts the pairs whose Bitwise XOR is greater than both the elements of pair ; Stores the count of pairs ; Generate all possible pairs ; Find the Bitwise XOR ; Find the maximum of two ; If xo < mx , increment count ; Print the value of count ; Driver Code ; Function Call
import java . io . * ; import java . util . * ; class GFG { static void countPairs ( int [ ] A , int N ) { int count = 0 ; for ( int i = 0 ; i < N ; i ++ ) { for ( int j = i + 1 ; j < N ; j ++ ) { int xo = ( A [ i ] ^ A [ j ] ) ; int mx = Math . max ( A [ i ] , A [ j ] ) ; if ( xo > mx ) { count ++ ; } } } System . out . println ( count ) ; } public static void main ( String [ ] args ) { int [ ] arr = { 2 , 4 , 3 } ; int N = arr . length ; countPairs ( arr , N ) ; } }
Possible arrangement of persons waiting to sit in a hall | Java program for the above approach ; Function to find the arrangement of seating ; Stores the row in which the ith person sits ; Stores the width of seats along with their index or row number ; Sort the array ; Store the seats and row for boy 's seat ; Stores the index of row upto which boys have taken seat ; Iterate the string ; Push the row number at index in vector and heap ; Increment the index to let the next boy in the next minimum width vacant row ; Otherwise ; If girl then take top of element of the max heap ; Pop from queue ; Print the values ; Driver Code ; Given N ; Given arr [ ] ; Given string ; Function Call
import java . io . * ; import java . util . * ; class Pair { int first , second ; Pair ( int first , int second ) { this . first = first ; this . second = second ; } } class GFG { static void findTheOrder ( int arr [ ] , String s , int N ) { List < Integer > ans = new ArrayList < Integer > ( ) ; List < Pair > A = new ArrayList < Pair > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { Pair p = new Pair ( arr [ i ] , i + 1 ) ; A . add ( p ) ; } Collections . sort ( A , ( p1 , p2 ) -> p1 . first - p2 . first ) ; PriorityQueue < Pair > q = new PriorityQueue < Pair > ( N , ( p1 , p2 ) -> p2 . first - p1 . first ) ; int index = 0 ; for ( int i = 0 ; i < 2 * N ; i ++ ) { if ( s . charAt ( i ) == '0' ) { ans . add ( A . get ( index ) . second ) ; q . add ( A . get ( index ) ) ; index ++ ; } else { ans . add ( q . peek ( ) . second ) ; q . poll ( ) ; } } for ( int i : ans ) { System . out . print ( i + " ▁ " ) ; } } public static void main ( String [ ] args ) { int N = 3 ; int arr [ ] = { 2 , 1 , 3 } ; String s = "001011" ; findTheOrder ( arr , s , N ) ; } }
Difference between sum of K maximum even and odd array elements | Java program for the above approach ; Function to find the absolute difference between sum of first K maximum even and odd numbers ; Stores index from where odd number starts ; Segregate even and odd number ; If current element is even ; Sort in decreasing order even part ; Sort in decreasing order odd part ; Calculate sum of k maximum even number ; Calculate sum of k maximum odd number ; Print the absolute difference ; Driver Code ; Given array arr [ ] ; Size of array ; Function Call
import java . util . * ; class GFG { static void evenOddDiff ( int a [ ] , int n , int k ) { int j = - 1 ; Vector < Integer > even = new Vector < > ( ) ; Vector < Integer > odd = new Vector < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] % 2 == 0 ) { even . add ( a [ i ] ) ; } else odd . add ( a [ i ] ) ; } j ++ ; Collections . sort ( even ) ; Collections . reverse ( even ) ; Collections . sort ( odd ) ; Collections . reverse ( odd ) ; int evenSum = 0 , oddSum = 0 ; for ( int i = 0 ; i < k ; i ++ ) { evenSum += even . get ( i ) ; } for ( int i = 0 ; i < k ; i ++ ) { oddSum += odd . get ( i ) ; } System . out . print ( Math . abs ( evenSum - oddSum ) ) ; } public static void main ( String [ ] args ) { int arr [ ] = { 1 , 8 , 3 , 4 , 5 } ; int N = arr . length ; int K = 2 ; evenOddDiff ( arr , N , K ) ; } }
Rearrange array to make product of prefix sum array non zero | Java program to implement the above approach ; Function to print array elements ; Function to rearrange array that satisfies the given condition ; Stores sum of elements of the given array ; Calculate totalSum ; If the totalSum is equal to 0 ; No possible way to rearrange array ; If totalSum exceeds 0 ; Rearrange the array in descending order ; Otherwise ; Rearrange the array in ascending order ; Driver Code
import java . util . * ; class GFG { static void printArr ( int arr [ ] , int N ) { for ( int i = 0 ; i < N ; i ++ ) { System . out . print ( arr [ i ] + " ▁ " ) ; } } static void rearrangeArr ( int arr [ ] , int N ) { int totalSum = 0 ; for ( int i = 0 ; i < N ; i ++ ) { totalSum += arr [ i ] ; } if ( totalSum == 0 ) { System . out . print ( " - 1" + "NEW_LINE"); } else if ( totalSum > 0 ) { Arrays . sort ( arr ) ; arr = reverse ( arr ) ; printArr ( arr , N ) ; } else { Arrays . sort ( arr ) ; printArr ( arr , N ) ; } } static int [ ] reverse ( int a [ ] ) { int i , n = a . length , t ; for ( i = 0 ; i < n / 2 ; i ++ ) { t = a [ i ] ; a [ i ] = a [ n - i - 1 ] ; a [ n - i - 1 ] = t ; } return a ; } public static void main ( String [ ] args ) { int arr [ ] = { 1 , - 1 , - 2 , 3 } ; int N = arr . length ; rearrangeArr ( arr , N ) ; } }
Count ways to distribute exactly one coin to each worker | Java program for the above approach ; Function to find number of way to distribute coins giving exactly one coin to each person ; Sort the given arrays ; Start from bigger salary ; Increment the amount ; Reduce amount of valid coins by one each time ; Return the result ; Driver code ; Given two arrays ; Function Call
import java . util . * ; class GFG { static int MOD = 1000000007 ; static int solve ( Vector < Integer > values , Vector < Integer > salary ) { int ret = 1 ; int amt = 0 ; Collections . sort ( values ) ; Collections . sort ( salary ) ; while ( salary . size ( ) > 0 ) { while ( values . size ( ) > 0 && values . get ( values . size ( ) - 1 ) >= salary . get ( salary . size ( ) - 1 ) ) { amt ++ ; values . remove ( values . size ( ) - 1 ) ; } if ( amt == 0 ) return 0 ; ret *= amt -- ; ret %= MOD ; salary . remove ( salary . size ( ) - 1 ) ; } return ret ; } public static void main ( String [ ] args ) { Vector < Integer > values = new Vector < Integer > ( ) ; values . add ( 1 ) ; values . add ( 2 ) ; Vector < Integer > salary = new Vector < Integer > ( ) ; salary . add ( 2 ) ; System . out . print ( solve ( values , salary ) ) ; } }
Count of index pairs with equal elements in an array | Set 2 | Java program for the above approach ; Function that counts the pair in the array arr [ ] ; Sort the array ; Initialize two pointers ; Add all valid pairs to answer ; Return the answer ; Driver Code ; Given array arr [ ] ; Function call
import java . util . * ; class GFG { static int countPairs ( int arr [ ] , int n ) { int ans = 0 ; Arrays . sort ( arr ) ; int left = 0 , right = 1 ; while ( right < n ) { if ( arr [ left ] == arr [ right ] ) ans += right - left ; else left = right ; right ++ ; } return ans ; } public static void main ( String [ ] args ) { int arr [ ] = { 2 , 2 , 3 , 2 , 3 } ; int N = arr . length ; System . out . print ( countPairs ( arr , N ) ) ; } }
Maximize the Sum of the given array using given operations | Java program to maximise the sum of the given array ; Comparator to sort the array in ascending order ; Function to maximise the sum of the given array ; Stores { A [ i ] , B [ i ] } pairs ; Sort in descending order of the values in the array A [ ] ; Stores the maximum sum ; If B [ i ] is equal to 0 ; Simply add A [ i ] to the sum ; Add the highest K numbers ; Subtract from the sum ; Return the sum ; Driver Code
import java . util . * ; class Pair implements Comparable < Pair > { int first , second ; Pair ( int x , int y ) { first = x ; second = y ; } public int compareTo ( Pair p ) { return p . first - first ; } } class GFG { static int maximiseScore ( int A [ ] , int B [ ] , int K , int N ) { ArrayList < Pair > pairs = new ArrayList < > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { pairs . add ( new Pair ( A [ i ] , B [ i ] ) ) ; } Collections . sort ( pairs ) ; int sum = 0 ; for ( int i = 0 ; i < N ; i ++ ) { if ( pairs . get ( i ) . second == 0 ) { sum += pairs . get ( i ) . first ; } else if ( pairs . get ( i ) . second == 1 ) { if ( K > 0 ) { sum += pairs . get ( i ) . first ; K -- ; } else { sum -= pairs . get ( i ) . first ; } } } return sum ; } public static void main ( String [ ] args ) { int A [ ] = { 5 , 4 , 6 , 2 , 8 } ; int B [ ] = { 1 , 0 , 1 , 1 , 0 } ; int K = 2 ; int N = A . length ; System . out . print ( maximiseScore ( A , B , K , N ) ) ; } }
Minimize Cost to sort a String in Increasing Order of Frequencies of Characters | Java program to implement above approach ; For a single character ; Stores count of repetitions of a character ; If repeating character ; Otherwise ; Store frequency ; Reset count ; Insert the last character block ; Sort the frequencies ; Stores the minimum cost of all operations ; Store the absolute difference of i - th frequencies of ordered and unordered sequences ; Return the minimum cost ; Driver code
import java . util . * ; class GFG { public static int sortString ( String S ) { Vector < Integer > sorted = new Vector < Integer > ( ) ; Vector < Integer > original = new Vector < Integer > ( ) ; boolean insert = false ; if ( S . length ( ) == 1 ) { System . out . println ( 0 ) ; } int curr = 1 ; for ( int i = 0 ; i < ( S . length ( ) - 1 ) ; i ++ ) { if ( S . charAt ( i ) == S . charAt ( i + 1 ) ) { curr += 1 ; insert = false ; } else { sorted . add ( curr ) ; original . add ( curr ) ; curr = 1 ; insert = true ; } } if ( ( S . charAt ( S . length ( ) - 1 ) != S . charAt ( S . length ( ) - 2 ) ) insert == false ) { sorted . add ( curr ) ; original . add ( curr ) ; } Collections . sort ( sorted ) ; int t_cost = 0 ; for ( int i = 0 ; i < sorted . size ( ) ; i ++ ) { t_cost += Math . abs ( sorted . get ( i ) - original . get ( i ) ) ; } return ( t_cost / 2 ) ; } public static void main ( String [ ] args ) { String S = " aabbcccdeffffggghhhhhii " ; System . out . print ( sortString ( S ) ) ; } }
K most occurring strings | Java program for the above approach ; Function that returns list of K most frequent strings ; Hash map to store the frequency of each string ; Set the default frequency of each string 0 ; Lambda expression is used set the priority , if frequencies are not equal than the string with greater frequency is returned else the string which is lexically smaller is returned ; Traverse the HashMap ; Remove top ( N - K ) elements ; Order queue has K most frequent strings in a reverse order ; Reverse the ArrayList so as to get in the desired order ; Driver Code ; Given array ; Function Call ; Print the K most occurring strings
import java . util . * ; class FrequentWords { public static ArrayList < String > frequentWords ( ArrayList < String > arr , int K ) { HashMap < String , Integer > Freq = new HashMap < > ( ) ; for ( String word : arr ) { Freq . put ( word , Freq . getOrDefault ( word , 0 ) + 1 ) ; } PriorityQueue < String > Order = new PriorityQueue < > ( ( a , b ) -> ( Freq . get ( a ) != Freq . get ( b ) ) ? Freq . get ( a ) - Freq . get ( b ) : b . compareTo ( a ) ) ; for ( String word : Freq . keySet ( ) ) { Order . offer ( word ) ; if ( Order . size ( ) > K ) { Order . poll ( ) ; } } ArrayList < String > ans = new ArrayList < > ( ) ; while ( ! Order . isEmpty ( ) ) { ans . add ( Order . poll ( ) ) ; } Collections . reverse ( ans ) ; return ans ; } public static void main ( String [ ] args ) { int N = 3 , K = 2 ; ArrayList < String > arr = new ArrayList < String > ( ) ; arr . add ( " car " ) ; arr . add ( " bus " ) ; arr . add ( " car " ) ; ArrayList < String > ans = frequentWords ( arr , K ) ; for ( String word : ans ) { System . out . println ( word + " ▁ " ) ; } } }
Sort numbers based on count of letters required to represent them in words | Java program to sort the strings based on the numbers of letters required to represent them ; letters [ i ] stores the count of letters required to represent the digit i ; Function to return the sum of letters required to represent N ; Function to sort the array according to the sum of letters to represent n ; Vector to store the digit sum with respective elements ; Inserting digit sum with elements in the vector pair ; Making the vector pair ; Sort the vector , this will sort the pair according to the sum of letters to represent n ; Print the sorted vector content ; Driver code
import java . util . * ; import java . lang . * ; class GFG { static int letters [ ] = { 4 , 3 , 3 , 3 , 4 , 4 , 3 , 5 , 5 , 4 } ; static int sumOfLetters ( int n ) { int sum = 0 ; while ( n > 0 ) { sum += letters [ n % 10 ] ; n = n / 10 ; } return sum ; } static void sortArr ( int arr [ ] , int n ) { ArrayList < int [ ] > vp = new ArrayList < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { vp . add ( new int [ ] { sumOfLetters ( arr [ i ] ) , arr [ i ] } ) ; } Collections . sort ( vp , ( a , b ) -> a [ 0 ] - b [ 0 ] ) ; for ( int i = 0 ; i < vp . size ( ) ; i ++ ) System . out . print ( vp . get ( i ) [ 1 ] + " ▁ " ) ; } public static void main ( String [ ] args ) { int arr [ ] = { 12 , 10 , 31 , 18 } ; int n = arr . length ; sortArr ( arr , n ) ; } }