dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; public class GFG { static int count ( string s , int k ) { int n = s . Length ; int d = 0 , i ; int count = 0 ; for ( i = 0 ; i < n ; i ++ ) d += s [ i ] ; if ( d % k == 0 ) count += 1 ; for ( i = k ; i < n ; i ++ ) { int prev = s [ i - k ] ; d -= prev ; d += s [ i ] ; if ( d % k == 0 ) count += 1 ; } return count ; } public static void Main ( ) { string s = " bcgabc " ; int k = 3 ; int ans = count ( s , k ) ; Console . Write ( ans ) ; } }

Index/key variables: i
Accumulator variables: count, d, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static string printFinalString ( string s ) { int i , n ; n = s . Length ; int x = 0 , y = 0 ; for ( i = 0 ; i < n ; i ++ ) { if ( s [ i ] == ' x ' ) { x ++ ; else { y ++ ; } } string finalString = " " ; if ( x > y ) { for ( i = 0 ; i < x - y ; i ++ ) { finalString += " x " ; } } else { for ( i = 0 ; i < y - x ; i ++ ) { finalString += " y " ; } } return finalString ; } public static void Main ( ) { string s = " xxyyxyy " ; Console . WriteLine ( printFinalString ( s ) ) ; } }

Index/key variables: i
Accumulator variables: finalString, i, x, y
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static String K_String ( String s , int k ) { int n = s . Length ; int [ ] fre = new int [ 26 ] ; for ( int i = 0 ; i < n ; i ++ ) fre [ s [ i ] - ' a ' ] ++ ; String str = " " ; for ( int i = 0 ; i < 26 ; i ++ ) { if ( fre [ i ] % k == 0 ) { int x = fre [ i ] / k ; while ( x != 0 ) { str += ( char ) ( i + ' a ' ) ; x -- ; } } else { return " - 1" ; } } return str ; } public static void Main ( String [ ] args ) { String s = " aabb " ; int k = 2 ; Console . WriteLine ( K_String ( s , k ) ) ; } }

Index/key variables: i
Accumulator variables: i, str, x
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class GFG { static int check ( string s ) { int i , j ; int [ ] fr = new int [ 26 ] ; int n = s . Length ; for ( i = 0 ; i < n ; i ++ ) { char x = s [ i ] ; fr [ x - ' a ' ] += 1 ; } int minimum = int . MaxValue ; for ( i = 0 ; i < 26 ; i ++ ) { for ( j = i + 1 ; j < 26 ; j ++ ) { int z = fr [ i ] + fr [ j ] ; minimum = Math . Min ( minimum , n - z ) ; } } return minimum ; } public static void Main ( ) { string s = " geeksforgeeks " ; Console . Write ( check ( s ) ) ; } }

Index/key variables: i, j
Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; using System . Collections ; using System . Collections . Generic ; class GFG { static int CountCharacters ( string str , int l , int r ) { int cnt = 0 ; Dictionary < char , int > m = new Dictionary < char , int > ( ) ; int len = str . Length ; for ( int i = 0 ; i < len ; i ++ ) { if ( ! ( l <= str [ i ] && str [ i ] <= r ) ) { cnt ++ ; if ( ! m . ContainsKey ( str [ i ] ) ) { m [ str [ i ] ] = 0 ; Console . Write ( str [ i ] + " ▁ " ) ; } m [ str [ i ] ] ++ ; } } return cnt ; } public static void Main ( string [ ] args ) { string str = " geeksforgeeks " ; int l = 102 , r = 111 ; Console . Write ( " Characters ▁ with ▁ ASCII ▁ values " + " not ▁ in ▁ the ▁ range ▁ [ l , ▁ r ] ▁ STRNEWLINE in " + " the ▁ given ▁ string ▁ are : ▁ " ) ; Console . WriteLine ( " and count is " CountCharacters ( str , l , r ) ) ; } }

Index/key variables: i
Accumulator variables: cnt, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void CountWords ( String str , int k ) { int sum = 0 ; int NumberOfWords = 0 ; int counter = 0 ; int len = str . Length ; for ( int i = 0 ; i < len ; ++ i ) { if ( str [ i ] == ' ▁ ' ) { if ( sum < k ) { counter ++ ; } sum = 0 ; NumberOfWords ++ ; } { sum += str [ i ] ; } } NumberOfWords ++ ; if ( sum < k ) { counter ++ ; } Console . WriteLine ( " Number ▁ of ▁ words ▁ having ▁ sum ▁ " + " of ▁ ASCII ▁ values ▁ less ▁ than ▁ k ▁ = ▁ " + counter ) ; Console . WriteLine ( " Number ▁ of ▁ words ▁ having ▁ sum ▁ of ▁ " + " ASCII ▁ values ▁ greater ▁ than ▁ or ▁ equal ▁ to ▁ k ▁ = ▁ " + ( NumberOfWords - counter ) ) ; } public static void Main ( String [ ] args ) { String str = " Learn ▁ how ▁ to ▁ code " ; int k = 400 ; CountWords ( str , k ) ; } }

Index/key variables: i
Accumulator variables: NumberOfWords, counter, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class Solution { static String separateChar ( String str ) { int n = str . Length , digitSum = 0 ; int alphabetSum = 0 , j = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( str [ i ] >= '0' && str [ i ] <= '9' ) { digitSum += ( int ) ( str [ i ] - '0' ) ; } else { alphabetSum += str [ i ] - ' a ' + 1 ; alphabetSum %= 26 ; } } String sumStr = " " + ( digitSum ) ; char alphabetStr = ( char ) ( alphabetSum + ' a ' - 1 ) ; sumStr += alphabetStr ; return sumStr ; } public static void Main ( ) { String str = "3652adyz3423" ; Console . WriteLine ( separateChar ( str ) ) ; } }

Index/key variables: i
Accumulator variables: alphabetSum, digitSum, i, sumStr
Iterator variables: i
Class/struct names: Solution
C# program:
using System ; public class GFG { readonly static int MAX_CHAR = 26 ; static int countPalindrome ( String str ) { int n = str . Length ; int sum = 0 ; int [ ] hashTable = new int [ MAX_CHAR ] ; for ( int i = 0 ; i < n ; i ++ ) { hashTable [ str [ i ] - ' a ' ] ++ ; } for ( int i = 0 ; i < 26 ; i ++ ) { if ( hashTable [ i ] != 0 ) { sum += ( hashTable [ i ] * ( hashTable [ i ] + 1 ) / 2 ) ; } } return sum ; } public static void Main ( ) { String str = " ananananddd " ; Console . Write ( countPalindrome ( str ) ) ; } }

Index/key variables: MAX_CHAR, i
Accumulator variables: i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class GFG { static int countConsecutive ( String s ) { int count = 0 ; for ( int i = 0 ; i < s . Length ; i ++ ) { if ( s [ i ] == s [ i + 1 ] ) { i ++ ; } else { count ++ ; } } return count ; } public static void Main ( ) { String str = "44522255" ; Console . WriteLine ( countConsecutive ( str ) ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int check_digits ( int n ) { while ( n != 0 ) { return 0 ; n /= 10 ; } return 1 ; } static int smallest_number ( int n ) { for ( int i = n ; ; i ++ ) if ( check_digits ( i ) == 1 ) return i ; } static void Main ( ) { int N = 2397 ; Console . WriteLine ( smallest_number ( N ) ) ; } }

Accumulator variables: i, n
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class GFG { static int smallestNumber ( int n ) { int num = 0 ; String s = " " ; int duplicate = n ; while ( n > 0 ) { s = ( char ) ( n % 10 + 48 ) + s ; n /= 10 ; } int index = - 1 ; for ( int i = 0 ; i < s . Length ; i ++ ) { int digit = s [ i ] - '0' ; if ( ( digit & 1 ) == 0 ) { index = i ; break ; } } if ( index == - 1 ) { return duplicate ; } for ( int i = 0 ; i < index ; i ++ ) { num = num * 10 + ( s [ i ] - '0' ) ; } num = num * 10 + ( s [ index ] - '0' + 1 ) ; for ( int i = index + 1 ; i < s . Length ; i ++ ) { num = num * 10 + 1 ; } return num ; } static public void Main ( ) { int N = 2397 ; Console . WriteLine ( smallestNumber ( N ) ) ; } }

Index/key variables: i, index
Accumulator variables: i, n
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int CountCharacters ( string str , int l , int r ) { int cnt = 0 ; int len = str . Length ; for ( int i = 0 ; i < len ; i ++ ) { if ( l <= str [ i ] && str [ i ] <= r ) { cnt ++ ; Console . Write ( str [ i ] + " ▁ " ) ; } } return cnt ; } public static void Main ( ) { string str = " geeksforgeeks " ; int l = 102 , r = 111 ; Console . Write ( " Characters ▁ with ▁ ASCII ▁ values " + " ▁ in ▁ the ▁ range ▁ [ l , ▁ r ] ▁ are ▁ STRNEWLINE " ) ; Console . Write ( " and count is " CountCharacters ( str , l , r ) ) ; } }

Index/key variables: i
Accumulator variables: cnt, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int minSteps ( string str ) { int count = 0 ; for ( int i = 0 ; i < str . Length - 2 ; i ++ ) { if ( ( ( int ) str [ i ] ) == '0' ) { if ( str [ i + 1 ] == '1' ) { if ( str [ i + 2 ] == '0' ) { count ++ ; i += 2 ; } } } } return count ; } public static void Main ( ) { string str = "0101010" ; Console . Write ( minSteps ( str ) ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void SieveOfEratosthenes ( Boolean [ ] prime , int p_size ) { prime [ 0 ] = false ; prime [ 1 ] = false ; for ( int p = 2 ; p * p <= p_size ; p ++ ) { if ( prime [ p ] ) { for ( int i = p * 2 ; i <= p_size ; i += p ) prime [ i ] = false ; } } } static int xorOfPrime ( char [ ] s ) { Boolean [ ] prime = new Boolean [ 100005 ] ; for ( int i = 0 ; i < 100005 ; i ++ ) prime [ i ] = true ; SieveOfEratosthenes ( prime , 10005 ) ; Dictionary < char , int > mp = new Dictionary < char , int > ( ) ; for ( int i = 0 ; i < s . Length ; i ++ ) { if ( mp . ContainsKey ( s [ i ] ) ) { var v = mp [ s [ i ] ] + 1 ; mp . Remove ( s [ i ] ) ; mp . Add ( s [ i ] , v ) ; } else { mp . Add ( s [ i ] , 1 ) ; } } int result = 0 ; int flag = 0 ; foreach ( KeyValuePair < char , int > entry in mp ) { if ( prime [ entry . Value ] ) { result ^= entry . Value ; flag = 1 ; } } if ( flag != 1 ) return - 1 ; return result ; } public static void Main ( String [ ] args ) { char [ ] s = " gggggeeekkkks " . ToCharArray ( ) ; Console . WriteLine ( xorOfPrime ( s ) ) ; } }

Index/key variables: i, p
Accumulator variables: i, p, result
Iterator variables: entry, i, p
Class/struct names: GFG
C# program:
using System ; class GFG { static int CountCharacters ( String str , int k ) { int cnt = 0 ; int len = str . Length ; for ( int i = 0 ; i < len ; i ++ ) { if ( ( ( int ) str [ i ] ) < k ) cnt ++ ; } return cnt ; } public static void Main ( ) { String str = " GeeksForGeeks " ; int k = 90 ; int count = CountCharacters ( str , k ) ; Console . WriteLine ( " Characters ▁ with ▁ ASCII ▁ values " + " less ▁ than ▁ K ▁ are ▁ " + count ) ; Console . WriteLine ( " Characters ▁ with ▁ ASCII ▁ values ▁ greater " + " than ▁ or ▁ equal ▁ to ▁ K ▁ are ▁ " + ( str . Length - count ) ) ; } }

Index/key variables: i
Accumulator variables: cnt, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static HashSet < String > seen = new HashSet < String > ( ) ; static List < int > edges = new List < int > ( ) ; static void dfs ( String node , int k , String A ) { for ( int i = 0 ; i < k ; ++ i ) { String str = node + A [ i ] ; if ( ! seen . Contains ( str ) ) { seen . Add ( str ) ; dfs ( str . Substring ( 1 ) , k , A ) ; edges . Add ( i ) ; } } } static String deBruijn ( int n , int k , String A ) { seen . Clear ( ) ; edges . Clear ( ) ; String startingNode = strings ( n - 1 , A [ 0 ] ) ; dfs ( startingNode , k , A ) ; String S = " " ; int l = ( int ) Math . Pow ( k , n ) ; for ( int i = 0 ; i < l ; ++ i ) S += A [ edges [ i ] ] ; S += startingNode ; return S ; } private static String strings ( int n , char charAt ) { String str = " " ; for ( int i = 0 ; i < n ; i ++ ) str += charAt ; return str ; } public static void Main ( String [ ] args ) { int n = 3 , k = 2 ; String A = "01" ; Console . Write ( deBruijn ( n , k , A ) ) ; } }

Index/key variables: i
Accumulator variables: S, i, str
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int countWords ( String str ) { int count = 1 ; for ( int i = 1 ; i < str . Length - 1 ; i ++ ) { if ( str [ i ] >= 65 && str [ i ] <= 90 ) count ++ ; } return count ; } public static void Main ( String [ ] args ) { String str = " geeksForGeeks " ; Console . Write ( countWords ( str ) ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static String isFibonacci ( String s ) { int i = 0 ; Dictionary < int , int > mp = new Dictionary < int , int > ( ) ; for ( i = 0 ; i < s . Length ; i ++ ) { if ( mp . ContainsKey ( s [ i ] ) ) { var val = mp [ s [ i ] ] ; mp . Remove ( s [ i ] ) ; mp . Add ( s [ i ] , val + 1 ) ; } else { mp . Add ( s [ i ] , 1 ) ; } } List < int > v = new List < int > ( ) ; int n = mp . Count ; int a = 1 , b = 1 ; int c ; v . Add ( a ) ; v . Add ( b ) ; for ( i = 0 ; i < n - 2 ; i ++ ) { v . Add ( a + b ) ; c = a + b ; a = b ; b = c ; } int flag = 1 ; foreach ( KeyValuePair < int , int > entry in mp ) { if ( entry . Value != v [ i ] ) { flag = 1 ; break ; } i ++ ; } if ( flag == 1 ) return " YES " ; else return " NO " ; } public static void Main ( String [ ] args ) { String s = " abeeedd " ; Console . WriteLine ( isFibonacci ( s ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: entry, i
Class/struct names: GFG
C# program:
using System ; class GFG { static String smallest ( String s ) { int l = s . Length ; String ans = " " ; for ( int i = 0 ; i < l - 1 ; i ++ ) { if ( s [ i ] > s [ i + 1 ] ) { for ( int j = 0 ; j < l ; j ++ ) { if ( i != j ) { ans += s [ j ] ; } } return ans ; } } ans = s . Substring ( 0 , l - 1 ) ; return ans ; } public static void Main ( ) { String s = " abcda " ; Console . Write ( smallest ( s ) ) ; } }

Index/key variables: i, j
Accumulator variables: ans, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int fact ( int n ) { int f = 1 ; for ( int i = 2 ; i <= n ; i ++ ) { f = f * i ; } return f ; } static int npr ( int n , int r ) { return fact ( n ) / fact ( n - r ) ; } static int countPermutations ( String str ) { int even = ( int ) Math . Floor ( ( double ) ( str . Length / 2 ) ) ; int odd = str . Length - even ; int ways = 0 ; int [ ] freq = new int [ 26 ] ; for ( int i = 0 ; i < str . Length ; i ++ ) { freq [ ( int ) ( str [ i ] - ' a ' ) ] ++ ; } int nvowels = freq [ 0 ] + freq [ 4 ] + freq [ 8 ] + freq [ 14 ] + freq [ 20 ] ; int nconsonants = str . Length - nvowels ; ways = npr ( odd , nvowels ) * npr ( nconsonants , nconsonants ) ; return ways ; } static void Main ( ) { String str = " geeks " ; Console . WriteLine ( countPermutations ( str ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class solution { static String replacingConsonants ( String s ) { String str = " aaaeeeeiiiiioooooouuuuuuuu " ; char [ ] st = s . ToCharArray ( ) ; for ( int i = 0 ; i < s . Length ; i ++ ) { int index = st [ i ] - ' a ' ; st [ i ] = str [ index ] ; } String str1 = new String ( st ) ; return str1 ; } public static void Main ( ) { String s = " geeksforgeeks " ; Console . WriteLine ( replacingConsonants ( s ) ) ; } }

Index/key variables: i, index
Accumulator variables: i
Iterator variables: i
Class/struct names: solution
C# program:
using System ; class GFG { static bool isVowel ( char ch ) { if ( ch != ' a ' && ch != ' e ' && ch != ' i ' && ch != ' o ' && ch != ' u ' ) { return false ; } return true ; } static String replaceConsonants ( char [ ] s ) { for ( int i = 0 ; i < s . Length ; i ++ ) { if ( ! isVowel ( s [ i ] ) ) { if ( s [ i ] == ' z ' ) { s [ i ] = ' b ' ; } else { s [ i ] = ( char ) ( s [ i ] + 1 ) ; if ( isVowel ( s [ i ] ) ) { s [ i ] = ( char ) ( s [ i ] + 1 ) ; } } } } return String . Join ( " " , s ) ; } public static void Main ( String [ ] args ) { String s = " geeksforgeeks " ; Console . WriteLine ( replaceConsonants ( s . ToCharArray ( ) ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { readonly static int MAX_CHAR = 26 ; static String removeChars ( String str , int k ) { int [ ] hash = new int [ MAX_CHAR ] ; int n = str . Length ; for ( int i = 0 ; i < n ; ++ i ) { hash [ str [ i ] - ' a ' ] ++ ; } String res = " " ; for ( int i = 0 ; i < n ; ++ i ) { if ( hash [ str [ i ] - ' a ' ] >= k ) { res += str [ i ] ; } } return res ; } static public void Main ( ) { String str = " geeksforgeeks " ; int k = 2 ; Console . WriteLine ( removeChars ( str , k ) ) ; } }

Index/key variables: MAX_CHAR, i
Accumulator variables: res
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static int countOnOff ( string n ) { int [ ] Led = new int [ ] { 6 , 2 , 5 , 5 , 4 , 5 , 6 , 3 , 7 , 5 } ; int len = n . Length ; int sum = Led [ n [ 0 ] - '0' ] ; for ( int i = 1 ; i < len ; i ++ ) { sum = sum + Math . Abs ( Led [ n [ i ] - '0' ] - Led [ n [ i - 1 ] - '0' ] ) ; } return sum ; } public static void Main ( string [ ] args ) { string n = "082" ; Console . WriteLine ( countOnOff ( n ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static Boolean check ( String s ) { int [ ] freq = new int [ 26 ] ; int n = s . Length ; for ( int i = 0 ; i < s . Length ; i ++ ) { freq [ ( s [ i ] ) - 97 ] += 1 ; } for ( int i = 0 ; i < freq . Length ; i ++ ) { if ( freq [ i ] % 2 == 1 ) { return false ; } } return true ; } public static void Main ( String [ ] args ) { String s = " abaccaba " ; if ( check ( s ) ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int max_length_substring ( string st , int n , int k ) { int max_len = 0 ; int len = 0 ; for ( int i = 0 ; i < n ; ++ i ) { if ( st [ i ] == '0' ) len ++ ; else len = 0 ; max_len = Math . Max ( max_len , len ) ; } if ( max_len == n ) return n * k ; int pref = 0 , suff = 0 ; for ( int i = 0 ; st [ i ] == '0' ; ++ i , ++ pref ) ; for ( int i = n - 1 ; st [ i ] == '0' ; -- i , ++ suff ) ; if ( k > 1 ) max_len = Math . Max ( max_len , pref + suff ) ; return max_len ; } public static void Main ( string [ ] args ) { int n = 6 ; int k = 3 ; string st = "110010" ; int ans = max_length_substring ( st , n , k ) ; Console . WriteLine ( ans ) ; } }

Index/key variables: i
Accumulator variables: len
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { bool isValidSubString ( String r , int K , int p ) { int c = 0 ; for ( int i = 0 ; i < r . Length ; i ++ ) { if ( ( int ) r [ i ] > p ) { c ++ ; } } if ( c == K ) { return true ; } else { return false ; } } void countSubStrings ( String s , int K , int p ) { int l = s . Length ; int count = 0 ; for ( int i = 0 ; i < l ; i ++ ) { for ( int j = K ; ( i + j ) <= l ; j ++ ) { String r = s . Substring ( i , j ) ; if ( isValidSubString ( r , K , p ) ) { count ++ ; } } } Console . WriteLine ( count ) ; } public static void Main ( String [ ] args ) { GFG g = new GFG ( ) ; String s = " abepztydba " ; int K = 4 ; int p = 110 ; g . countSubStrings ( s , K , p ) ; } }

Index/key variables: i
Accumulator variables: c, count, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int count ( string S , int X ) { int count = 0 ; int N = S . Length ; for ( int i = 0 ; i < N ; ++ i ) { if ( S [ i ] != '0' ) { for ( int len = 1 ; ( i + len ) <= N ; ++ len ) { int num = Int32 . Parse ( S . Substring ( i , len ) ) ; if ( num > X ) count ++ ; } } } return count ; } public static void Main ( String [ ] args ) { string S = "2222" ; int X = 97 ; Console . WriteLine ( count ( S , X ) ) ; } }

Index/key variables: i
Accumulator variables: count
Iterator variables: i, len
Class/struct names: GFG
C# program:
using System ; public class Solution { public static bool isBinary ( int n ) { while ( n != 0 ) { int temp = n % 10 ; if ( temp != 0 && temp != 1 ) { return false ; } n = n / 10 ; } return true ; } public static void formBinaryStr ( int n , int [ ] a ) { bool flag = true ; string s = " " ; for ( int i = 0 ; i < n ; i ++ ) { if ( isBinary ( a [ i ] ) ) { s += " " + a [ i ] ; } else { flag = false ; break ; } } if ( flag ) { Console . Write ( s + " STRNEWLINE " ) ; } else { Console . Write ( " - 1 STRNEWLINE " ) ; } } public static void Main ( string [ ] args ) { int [ ] a = new int [ ] { 10 , 1 , 0 , 11 , 10 } ; int N = a . Length ; formBinaryStr ( N , a ) ; } }

Index/key variables: i
Accumulator variables: i, s
Iterator variables: i
Boolean variables: flag
Class/struct names: Solution
C# program:
using System ; class GFG { static int fact ( int n ) { int result = 1 ; for ( int i = 1 ; i <= n ; i ++ ) result *= i ; return result ; } static int getResult ( string str , char ch ) { int [ ] has = new int [ 26 ] ; for ( int i = 0 ; i < 26 ; i ++ ) has [ i ] = 0 ; for ( int i = 0 ; i < str . Length ; i ++ ) has [ str [ i ] - ' A ' ] ++ ; int particular = has [ ch - ' A ' ] ; if ( particular == 0 ) return 0 ; has [ ch - ' A ' ] = 0 ; int total = str . Length ; total = total - particular + 1 ; int result = fact ( total ) ; for ( int i = 0 ; i < 26 ; i ++ ) { if ( has [ i ] > 1 ) { result = result / fact ( has [ i ] ) ; } } return result ; } public static void Main ( ) { string str = " MISSISSIPPI " ; Console . WriteLine ( getResult ( str , ' S ' ) ) ; } }

Index/key variables: i
Accumulator variables: i, result
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static bool isAnyNotPalindrome ( String s ) { HashSet < char > unique = new HashSet < char > ( ) ; for ( int i = 0 ; i < s . Length ; i ++ ) unique . Add ( s [ i ] ) ; if ( unique . Count > 1 ) return true ; else return false ; } public static void Main ( String [ ] args ) { String s = " aaaaab " ; if ( isAnyNotPalindrome ( s ) ) Console . WriteLine ( " YES " ) ; else Console . WriteLine ( " NO " ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static long factorial ( long n ) { long res = 1 ; for ( int i = 1 ; i <= n ; i ++ ) res = res * i ; return res ; } static long count ( string word ) { int [ ] freq = new int [ 27 ] ; for ( int i = 0 ; i < 27 ; i ++ ) freq [ i ] = 0 ; long vowel = 0 , consonant = 0 ; for ( int i = 0 ; i < word . Length ; i ++ ) { freq [ word [ i ] - ' A ' ] ++ ; if ( word [ i ] == ' A ' word [ i ] == ' E ' word [ i ] == ' I ' word [ i ] == ' O ' word [ i ] == ' U ' ) { vowel ++ ; } else consonant ++ ; } long vowelArrange ; vowelArrange = factorial ( vowel ) ; vowelArrange /= factorial ( freq [ 0 ] ) ; vowelArrange /= factorial ( freq [ 4 ] ) ; vowelArrange /= factorial ( freq [ 8 ] ) ; vowelArrange /= factorial ( freq [ 14 ] ) ; vowelArrange /= factorial ( freq [ 20 ] ) ; long consonantArrange ; consonantArrange = factorial ( consonant ) ; for ( int i = 0 ; i < 26 ; i ++ ) { if ( i != 0 && i != 4 && i != 8 && i != 14 && i != 20 ) consonantArrange /= factorial ( freq [ i ] ) ; } long total = vowelArrange * consonantArrange ; return total ; } public static void Main ( ) { string word = " COMPUTER " ; long ans = count ( word ) ; Console . WriteLine ( ans ) ; } }

Index/key variables: i
Accumulator variables: consonant, consonantArrange, i, vowel, vowelArrange
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPalindrome ( String s ) { String s1 = " " ; int N = s . Length ; for ( int i = N - 1 ; i >= 0 ; i -- ) s1 += s [ i ] ; if ( s . Equals ( s1 ) ) return true ; return false ; } static bool createString ( int N ) { String str = " " ; String s = " " + N ; String letters = " abcdefghij " ; int sum = 0 ; String substr = " " ; for ( int i = 0 ; i < s . Length ; i ++ ) { int digit = s [ i ] - '0' ; substr += letters [ digit ] ; sum += digit ; } while ( str . Length <= sum ) { str += substr ; } str = str . Substring ( 0 , sum ) ; return isPalindrome ( str ) ; } public static void Main ( ) { int N = 61 ; bool flag = createString ( N ) ; if ( flag ) Console . WriteLine ( " YES " ) ; else Console . WriteLine ( " NO " ) ; } }

Index/key variables: digit, i
Accumulator variables: i, s1, str, substr, sum
Iterator variables: i
Class/struct names: GFG