Generate a String of having N * N distinct non | C # program to implement the above approach ; Function to construct a string having N * N non - palindromic substrings ; Driver Code
using System ; class GFG { static void createString ( int N ) { for ( int i = 0 ; i < N ; i ++ ) { Console . Write ( ' a ' ) ; } for ( int i = 0 ; i < N ; i ++ ) { Console . Write ( ' b ' ) ; } } public static void Main ( String [ ] args ) { int N = 4 ; createString ( N ) ; } }