codeparrot/xlcost-text-to-code huggingface dataset:
Minimum K such that every substring of length at least K contains a character c | Set | C # program for the above approach ; Function to find minimum value of K such that there exist atleast one K amazing character ; Stores the answer ; Update the string S ; Iterate over the characters in range [ a , z ] ; Stores the last index where c appears ; Stores the maximum possible length ; Update string S ; Iterate over characters of string S ; If S [ i ] is equal to c ; Stores the distance between positions of two same c ; Update max_len ; Update the value of prev ; Update the value of ans ; Return the answer ; Driver Code ; Given Input ; Function Call
using System ; using System . Collections . Generic ; class GFG { static int MinimumLengthSubstring ( string S , int N ) { int ans = N ; S = "0" + S + "0" ; for ( char c = ' a ' ; c <= ' z ' ; ++ c ) { int prev = 0 ; int max_len = 0 ; S = S . Substring ( 0 , 0 ) + c + S . Substring ( 1 ) ; S = S . Substring ( 0 , N + 1 ) + c + S . Substring ( N + 2 ) ; for ( int i = 1 ; i <= N + 1 ; ++ i ) { if ( S [ i ] == c ) { int len = i - prev ; max_len = Math . Max ( max_len , len ) ; prev = i ; } } ans = Math . Min ( ans , max_len ) ; } return ans ; } public static void Main ( ) { string S = " abcde " ; int N = S . Length ; Console . Write ( MinimumLengthSubstring ( S , N ) ) ; } }
Minimize hamming distance in Binary String by setting only one K size substring bits | C # program for the above approach ; Function to find minimum Hamming Distance after atmost one operation ; Store the size of the string ; Store the prefix sum of 1 s ; Create Prefix Sum array ; Initialize cnt as number of ones in string S ; Store the required result ; Traverse the string , S ; Store the number of 1 s in the substring S [ i , i + K - 1 ] ; Update the answer ; Return the result ; Driver Code ; Given Input ; Function Call
using System ; using System . Collections . Generic ; class GFG { static int minimumHammingDistance ( string S , int K ) { int n = S . Length ; int [ ] pref = new int [ n ] ; pref [ 0 ] = ( int ) S [ 0 ] - 48 ; for ( int i = 1 ; i < n ; i ++ ) pref [ i ] = pref [ i - 1 ] + ( ( int ) S [ i ] - 48 ) ; int cnt = pref [ n - 1 ] ; int ans = cnt ; for ( int i = 0 ; i < n - K ; i ++ ) { int value = pref [ i + K - 1 ] - ( i - 1 >= 0 ? pref [ i - 1 ] : 0 ) ; ans = Math . Min ( ans , cnt - value + ( K - value ) ) ; } return ans ; } public static void Main ( ) { string s = "101" ; int K = 2 ; Console . Write ( minimumHammingDistance ( s , K ) ) ; } }
Check if a permutation of S2 can be obtained by adding or removing characters from S1 | C # program for the above approach ; Function to check if the given number is prime or not ; If the number is less than 2 ; If the number is 2 ; If N is a multiple of 2 ; Otherwise , check for the odds values ; Function to check if S1 can be a permutation of S2 by adding or removing characters from S1 ; Initialize a frequency array ; Decrement the frequency for occurrence in s1 ; Increment the frequency for occurence in s2 ; If frequency of current char is same in s1 and s2 ; Check the frequency for the current char is not prime ; Print the result ; Driver Code
using System ; class GFG { private static bool isPrime ( int n ) { if ( n <= 1 ) return false ; else if ( n == 2 ) return true ; else if ( n % 2 == 0 ) return false ; for ( int i = 3 ; i <= Math . Sqrt ( n ) ; i += 2 ) { if ( n % i == 0 ) return false ; } return true ; } private static void checkPermutation ( string s1 , string s2 ) { int [ ] freq = new int [ 26 ] ; foreach ( char ch in s1 . ToCharArray ( ) ) { freq [ ch - ' a ' ] -- ; } foreach ( char ch in s2 . ToCharArray ( ) ) { freq [ ch - ' a ' ] ++ ; } bool isAllChangesPrime = true ; for ( int i = 0 ; i < 26 ; i ++ ) { if ( freq [ i ] == 0 ) { continue ; } else if ( ! isPrime ( Math . Abs ( freq [ i ] ) ) ) { isAllChangesPrime = false ; break ; } } if ( isAllChangesPrime != false ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } public static void Main ( String [ ] args ) { string S1 = " gekforgk " ; string S2 = " geeksforgeeks " ; checkPermutation ( S1 , S2 ) ; } }
Check if String formed by first and last X characters of a String is a Palindrome | C # implementation for the above approach ; Function to check whether the first x characters of both string str and reversed string str are same or not ; Length of the string str ; Traverse over the string while first and last x characters are not equal ; If the current and n - k - 1 from last character are not equal ; Finally , print true ; Driver Code ; Given Input ; Function Call
using System ; using System . Collections . Generic ; class GFG { static void isEqualSubstring ( string str , int x ) { int n = str . Length ; int i = 0 ; while ( i < n && i < x ) { if ( str [ i ] != str [ n - i - 1 ] ) { Console . Write ( " false " ) ; return ; } i ++ ; } Console . Write ( " true " ) ; } public static void Main ( ) { string str = " GeeksforGeeks " ; int x = 3 ; isEqualSubstring ( str , x ) ; } }
Minimum number of replacement done of substring "01" with "110" to remove it completely | C # program for the above approach ; Function to find the minimum number of replacement of "01" with "110" s . t . S doesn 't contain substring "10" ; Stores the number of operations performed ; Stores the resultant count of substrings ; Traverse the string S from end ; If the current character is 0 ; If the current character is 1 ; Print the result ; Driver code
using System ; class GFG { public static void minimumOperations ( string S , int N ) { int ans = 0 ; int cntOne = 0 ; for ( int i = N - 1 ; i >= 0 ; i -- ) { if ( S [ i ] == '0' ) { ans += cntOne ; cntOne *= 2 ; } else cntOne ++ ; } Console . WriteLine ( ans ) ; } static void Main ( ) { string S = "001" ; int N = S . Length ; minimumOperations ( S , N ) ; } }
Count different Bitwise OR values of equal length strings S1 and S2 by swapping exactly one pair of characters from the first string | C # program for the above approach ; Function to find the number of ways to obtain different Bitwise OR ; Stores the count of pairs t00 , t10 , t01 , t11 ; Traverse the characters of the string S1 and S2 ; Count the pair ( 0 , 0 ) ; Count the pair ( 1 , 0 ) ; Count the pair ( 1 , 1 ) ; Count the pair ( 0 , 1 ) ; Number of ways to calculate the different bitwise OR ; Print the result ; Driver Code
using System ; class GFG { static void differentBitwiseOR ( String s1 , String s2 ) { int n = s1 . Length ; int t00 = 0 , t10 = 0 , t01 = 0 , t11 = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( s1 [ i ] == '0' && s2 [ i ] == '0' ) { t00 ++ ; } if ( s1 [ i ] == '1' && s2 [ i ] == '0' ) { t10 ++ ; } if ( s1 [ i ] == '1' && s2 [ i ] == '1' ) { t11 ++ ; } if ( s1 [ i ] == '0' && s2 [ i ] == '1' ) { t01 ++ ; } } int ans = t00 * t10 + t01 * t10 + t00 * t11 ; Console . Write ( ans ) ; } public static void Main ( ) { String S1 = "01001" ; String S2 = "11011" ; differentBitwiseOR ( S1 , S2 ) ; } }
Minimum number of removals required such that no subsequence of length 2 occurs more than once | C # program for the above approach ; Function to remove the minimum count of characters from the string such that no subsequence of length 2 repeats ; Initialize the final string ; Stores if any character occurs in the final string or not ; Store the index of the last character added in the string ; Traverse the string ; Add all the unique characters ; Check if S [ 0 ] appears in the range [ pos + 1 , N - 1 ] ; If the characters are the same ; Print the resultant string ; Driver Code
using System ; using System . Collections . Generic ; class GFG { static void RemoveCharacters ( string s ) { string ans = " " ; int [ ] c = new int [ 26 ] ; for ( int i = 0 ; i < 26 ; i ++ ) c [ i ] = 0 ; int pos = 0 ; for ( int i = 0 ; i < s . Length ; i ++ ) { if ( c [ ( int ) s [ i ] - 97 ] == 0 ) { c [ ( int ) s [ i ] - 97 ] = 1 ; pos = i ; ans += s [ i ] ; } } for ( int i = pos + 1 ; i < s . Length ; i ++ ) { if ( s [ i ] == s [ 0 ] ) { ans += s [ i ] ; break ; } } Console . Write ( ans ) ; } public static void Main ( ) { string S = " abcaadbcd " ; RemoveCharacters ( S ) ; } }
Convert given Binary string S to all 1 s by changing all 0 s to 1 s in range [ i + 1 , i + K ] if S [ i ] is 1 | C # program for the above approach ; Function to check whether all 0 s in the string can be changed into 1 s ; Store the count of 0 s converted for the last occurrence of 1 ; Declere a stack ; Traverse the string , S ; If stack is empty ; There is no 1 that can change this 0 to 1 ; Push 1 into the stack ; The last 1 has reached its limit ; New 1 has been found which can now change at most K 0 s ; If flag is 1 , print " YES " else print " NO " ; Driver code ; Given Input ; Function call
using System ; using System . Collections . Generic ; class GFG { static void changeCharacters ( string S , int N , int K ) { int flag = 1 ; int count = 0 ; Stack < char > st = new Stack < char > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { if ( st . Count == 0 ) { if ( S [ i ] == '0' ) { flag = 0 ; break ; } count = 0 ; st . Push ( S [ i ] ) ; } else { if ( S [ i ] == '0' ) { count ++ ; if ( count == K ) { st . Pop ( ) ; count = 0 ; } } else { count = 0 ; } } } if ( flag == 1 ) Console . Write ( " YES " ) ; else Console . Write ( " NO " ) ; } public static void Main ( ) { string S = "100100" ; int N = S . Length ; int K = 2 ; changeCharacters ( S , N , K ) ; } }
Check if all prefixes of a number is divisible by remaining count of digits | C # program for the above approach ; Function to check if all prefixes of a number is divisible by remaining count of digits or not ; Traverse and check divisibility for each updated number ; Update the original number ; Driver Code ; Given Input ; Function Call
using System ; using System . Collections . Generic ; class GFG { static bool prefixDivisble ( int n ) { int i = 1 ; while ( n > 0 ) { if ( n % i != 0 ) return false ; n = n / 10 ; i ++ ; } return true ; } public static void Main ( ) { int n = 52248 ; if ( prefixDivisble ( n ) ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }
Minimize cost to make all characters of a Binary String equal to '1' by reversing or flipping characters of substrings | C # program for the above approach ; Function to calculate minimum cost to convert all the characters of S to '1' ; Stores the result ; Stores the number of groups that have 0 as characters ; Traverse the string S ; If current character is '0' ; If count is greater than 0 ; Set the count to 0 ; If the last few consecutive characters are '0' ; If string contains all characters as '1' ; Minimum Cost ; Driver Code ; Given Input ; Function Call
using System ; using System . Collections . Generic ; class GFG { static void MinimumCost ( string S , int A , int B ) { int count = 0 ; int group = 0 ; for ( int i = 0 ; i < S . Length ; i ++ ) { if ( S [ i ] == '0' ) { count += 1 ; } else { if ( count > 0 ) { group += 1 ; } count = 0 ; } } if ( count > 0 ) group += 1 ; if ( group == 0 ) { Console . WriteLine ( 0 ) ; } else { Console . Write ( Math . Min ( A , B ) * ( group - 1 ) + B ) ; } } public static void Main ( ) { int A = 1 ; int B = 5 ; string S = "01100" ; MinimumCost ( S , A , B ) ; } }
Count strings having sum of ASCII values of characters equal to a Prime or Armstrong Number | C # program for the above approach ; Function to check if a number is prime number ; Define a flag variable ; Check for factors of num ; If factor is found , set flag to True and break out of loop ; Check if flag is True ; Function to calculate order of the number x ; Function to check whether the given number is Armstrong number or not ; If the condition satisfies ; Function to count Armstrong valued strings ; Stores the count of Armstrong valued strings ; Iterate over the list ; Store the value of the string ; Find value of the string ; Check if it an Armstrong number ; Function to count prime valued strings ; Store the count of prime valued strings ; Iterate over the list ; Store the value of the string ; Find value of the string ; Check if it is a Prime Number ; Driver code ; Function Call
using System ; using System . Collections . Generic ; class GFG { static bool isPrime ( int num ) { bool flag = false ; if ( num > 1 ) { for ( int i = 2 ; i < num ; i ++ ) { if ( ( num % i ) == 0 ) { flag = true ; break ; } } } if ( flag ) return false ; else return true ; } static int order ( int x ) { int n = 0 ; while ( x != 0 ) { n = n + 1 ; x = x / 10 ; } return n ; } static bool isArmstrong ( int x ) { int n = order ( x ) ; int temp = x ; int sum1 = 0 ; while ( temp != 0 ) { int r = temp % 10 ; sum1 = sum1 + ( int ) ( Math . Pow ( r , n ) ) ; temp = temp / 10 ; } return ( sum1 == x ) ; } static int count_armstrong ( string [ ] li ) { int c = 0 ; foreach ( string ele in li ) { int val = 0 ; foreach ( char che in ele ) val += che ; if ( isArmstrong ( val ) ) c += 1 ; } return c ; } static int count_prime ( string [ ] li ) { int c = 0 ; foreach ( string ele in li ) { int val = 0 ; foreach ( char che in ele ) val += che ; if ( isPrime ( val ) ) c += 1 ; } return c ; } public static void Main ( ) { string [ ] arr = { " geeksforgeeks " , " a " , " computer " , " science " , " portal " , " for " , " geeks " } ; Console . WriteLine ( " Number ▁ of ▁ Armstrong ▁ Strings ▁ are : ▁ " + count_armstrong ( arr ) ) ; Console . WriteLine ( " Number ▁ of ▁ Prime ▁ Strings ▁ are : ▁ " + count_prime ( arr ) ) ; } }
Minimize cost of flipping or swaps to make a Binary String balanced | C # program for the above approach ; Function to find the minimum cost to convert the given string into balanced string ; Stores count of 1 ' s ▁ and ▁ 0' s in the string ; Traverse the string ; Increment count1 ; Increment count 0 ; Stores absolute difference of counts of 0 ' s ▁ and ▁ 1' s ; If string consists of only 0 ' s ▁ and ▁ 1' s ; Print minimum cost ; Driver Code
using System ; class GFG { static void findMinimumCost ( String s , int N ) { int count_1 = 0 , count_0 = 0 ; for ( int i = 0 ; i < N ; i ++ ) { if ( s [ i ] == '1' ) count_1 ++ ; else count_0 ++ ; } int k = Math . Abs ( count_0 - count_1 ) ; if ( count_1 == N count_0 == N ) Console . WriteLine ( - 1 ) ; else Console . WriteLine ( k / 2 ) ; } static public void Main ( ) { String S = "110110" ; int N = S . Length ; findMinimumCost ( S , N ) ; } }
Minimum time required to complete all tasks with alteration of their order allowed | C # program for the above approach ; Function to find the minimum time required to complete the tasks if the order of tasks can be changed ; If there is no task , print 0 ; Store the maximum occurring character and its frequency ; Stores the frequency of each character ; Traverse the string S ; Increment the frequency of the current character ; Update maxfreq and maxchar ; Store the number of empty slots ; Traverse the hashmap , um ; Fill the empty slots ; Store the required result ; Print the result ; Driver Code
using System ; using System . Collections . Generic ; class GFG { static void findMinimumTime ( string S , int N , int K ) { if ( N == 0 ) { Console . Write ( 0 ) ; return ; } int maxfreq = Int32 . MinValue ; char maxchar = ' ▁ ' ; Dictionary < char , int > um = new Dictionary < char , int > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { if ( um . ContainsKey ( S [ i ] ) ) um [ S [ i ] ] ++ ; else um . Add ( S [ i ] , 1 ) ; if ( um . ContainsKey ( S [ i ] ) && um [ S [ i ] ] > maxfreq ) { maxfreq = um [ S [ i ] ] ; maxchar = S [ i ] ; } } int emptySlots = ( maxfreq - 1 ) * K ; foreach ( KeyValuePair < char , int > kvp in um ) { if ( kvp . Key == maxchar ) continue ; emptySlots -= Math . Min ( kvp . Value , maxfreq - 1 ) ; } int ans = N + Math . Max ( 0 , emptySlots ) ; Console . Write ( ans ) ; } public static void Main ( ) { string S = " AAABBB " ; int K = 2 ; int N = S . Length ; findMinimumTime ( S , N , K ) ; } }
Check if all characters of a string can be made equal by increments or decrements | C # program for the above approach ; Function to check if it is possible to make all characters of string S same or not ; Length of string ; Stores the sum of ASCII value ; Traverse the string S ; Update the weightOfString ; If the sum is divisible by N then print " Yes " ; Otherwise print " No " ; Driver Code
using System ; class GFG { static void canMakeEqual ( String S ) { int N = S . Length ; int weightOfString = 0 ; for ( int i = 0 ; i < N ; i ++ ) { weightOfString += S [ i ] - ' a ' + 1 ; } if ( weightOfString % N == 0 ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } public static void Main ( String [ ] args ) { String S = " beb " ; canMakeEqual ( S ) ; } }
Modify a string by circularly shifting each character to the right by respective frequencies | C # program for the above approach ; Function to replace the characters by its frequency of character in it ; Stores frequencies of characters in the string S ; Traverse the string S ; Increment the frequency of each character by 1 ; Traverse the string S ; Find the frequency of the current character ; Update the character ; Print the resultant string ; Driver Code
using System ; class GFG { static void addFrequencyToCharacter ( string Str ) { int [ ] frequency = new int [ 26 ] ; int N = Str . Length ; char [ ] S = Str . ToCharArray ( ) ; for ( int i = 0 ; i < N ; i ++ ) { frequency [ S [ i ] - ' a ' ] += 1 ; } for ( int i = 0 ; i < N ; i ++ ) { int add = frequency [ S [ i ] - ' a ' ] % 26 ; if ( ( int ) ( S [ i ] ) + add <= ( int ) ( ' z ' ) ) S [ i ] = ( char ) ( ( int ) ( S [ i ] ) + add ) ; else { add = ( ( int ) ( S [ i ] ) + add ) - ( ( int ) ( ' z ' ) ) ; S [ i ] = ( char ) ( ( int ) ( ' a ' ) + add - 1 ) ; } } Console . Write ( new string ( S ) ) ; } public static void Main ( string [ ] args ) { string S = " geeksforgeeks " ; addFrequencyToCharacter ( S ) ; } }
Minimize length of a string by removing pairs of consecutive increasing or decreasing digits | C # program for the above approach ; Function to find the minimum length of the string possible after removing pairs of consecutive digits ; Initialize the stack st ; Traverse the string S ; If the stack is empty ; Otherwise ; Get the top character of the stack ; If cha and top are consecutive digits ; Otherwise , push the character ch ; Print the size of the stack ; Driver Code
using System ; using System . Collections . Generic ; class GFG { static int minLength ( String S ) { Stack < char > st = new Stack < char > ( ) ; foreach ( char ch in S . ToCharArray ( ) ) { if ( st . Count == 0 ) st . Push ( ch ) ; else { char top = st . Peek ( ) ; if ( Math . Abs ( ch - top ) == 1 ) st . Pop ( ) ; else { st . Push ( ch ) ; } } } return st . Count ; } public static void Main ( String [ ] args ) { String S = "12213" ; Console . WriteLine ( minLength ( S ) ) ; } }
Minimum time required to complete all tasks without altering their order | C # implementation of the above approach ; Function to find the minimum time required to complete tasks without changing their order ; Keeps track of the last time instant of each task ; Stores the required result ; Traverse the given string ; Check last time instant of task , if it exists before ; Increment the time if task is within the K units of time ; Update the time of the current task in the map ; Increment the time by 1 ; Print the result ; Driver Code
using System ; using System . Collections . Generic ; class GFG { static void findMinimumTime ( String tasks , int K ) { Dictionary < char , int > map = new Dictionary < char , int > ( ) ; int curr_time = 0 ; foreach ( char c in tasks . ToCharArray ( ) ) { if ( map . ContainsKey ( c ) ) { if ( curr_time - map <= K ) { curr_time += K - ( curr_time - map ) + 1 ; } } if ( ! map . ContainsKey ( c ) ) map . Add ( c , curr_time ) ; else map = curr_time ; curr_time ++ ; } Console . WriteLine ( curr_time ) ; } public static void Main ( String [ ] args ) { String S = " ABACCA " ; int K = 2 ; findMinimumTime ( S , K ) ; } }
Check if a string is a subsequence of another string ( using Stacks ) | C # approach for the above approach ; Function to check if target is a subsequence of string S ; Declare a stack ; Push the characters of target into the stack ; Traverse the string S in reverse ; If the stack is empty ; If S [ i ] is same as the top of the stack ; Pop the top of stack ; Stack s is empty ; Driver Code
using System ; using System . Collections . Generic ; class GFG { static void checkforSubsequence ( String S , String target ) { Stack < char > s = new Stack < char > ( ) ; for ( int i = 0 ; i < target . Length ; i ++ ) { s . Push ( target [ i ] ) ; } for ( int i = ( int ) S . Length - 1 ; i >= 0 ; i -- ) { if ( s . Count == 0 ) { Console . WriteLine ( " Yes " ) ; return ; } if ( S [ i ] == s . Peek ( ) ) { s . Pop ( ) ; } } if ( s . Count == 0 ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } public static void Main ( String [ ] args ) { String S = " KOTTAYAM " ; String target = " KOTA " ; checkforSubsequence ( S , target ) ; } }
Program to construct a DFA to check if a given integer is unsigned or not | C # program for the above approach ; Function to construct DFA as per the given conditions ; If at state 0 and a digit has occurred then set it to state 1 ; Similarly for all other states ; Function to build and connect the DFA states ; Connect all the states to the dead state ; Function call to make DFA as per the given conditions ; Function call to check whether an integer in the form of string is unsigned integer or not ; Build the DFA ; Stores the current state ; Traverse the string ; If at a certain state a digit occurs then change the current state according to the DFA ; Or + / - sign ; Or decimal occurred ; Or any other character ; Or e / E or exponent sign ; State 1 , 4 , 8 will give the final answer ; Driver Code
using System ; class GFG { static string digits = "0123456789" , sign = " + - " ; static string dot = " . " , ex = " eE " ; static int [ , ] dfa = new int [ 11 , 5 ] ; static void makeDFA ( ) { dfa [ 0 , 0 ] = 1 ; dfa [ 1 , 0 ] = 1 ; dfa [ 1 , 2 ] = 3 ; dfa [ 1 , 3 ] = 2 ; dfa [ 1 , 4 ] = 6 ; dfa [ 3 , 0 ] = 4 ; dfa [ 4 , 0 ] = 4 ; dfa [ 4 , 3 ] = 5 ; dfa [ 4 , 4 ] = 6 ; dfa [ 6 , 0 ] = 8 ; dfa [ 6 , 1 ] = 7 ; dfa [ 7 , 0 ] = 8 ; dfa [ 8 , 0 ] = 8 ; dfa [ 8 , 3 ] = 9 ; } static void buildDFA ( ) { for ( int i = 0 ; i < 11 ; i ++ ) for ( int j = 0 ; j < 5 ; j ++ ) dfa [ i , j ] = 10 ; makeDFA ( ) ; } static void checkDFA ( string s ) { buildDFA ( ) ; int currentstate = 0 ; for ( int i = 0 ; i < s . Length ; i ++ ) { if ( digits . IndexOf ( s [ i ] ) != - 1 ) currentstate = dfa [ currentstate , 0 ] ; else if ( sign . IndexOf ( s [ i ] ) != - 1 ) currentstate = dfa [ currentstate , 1 ] ; else if ( dot . IndexOf ( s [ i ] ) != - 1 ) currentstate = dfa [ currentstate , 2 ] ; else if ( ex . IndexOf ( s [ i ] ) != - 1 ) currentstate = dfa [ currentstate , 4 ] ; else currentstate = dfa [ currentstate , 3 ] ; } if ( currentstate == 1 currentstate == 4 currentstate == 8 ) { Console . WriteLine ( " Unsigned ▁ integer " ) ; } else { Console . WriteLine ( " Not ▁ an ▁ unsigned ▁ integer " ) ; } } public static void Main ( string [ ] args ) { string S = "1729" ; checkDFA ( S ) ; } }