Skip to main content

Posts

Showing posts from August 4, 2021

Coding Challenge: C# program to find the given string is a Pangram

Coding Challenge to find the given string is a Pangram or not Pangram is a string which will contain all the alphabets (a-z) Example:  "The quick brown fox jumps over the lazy dog" From Wikipedia  Conditions: * Spaces allowed in the input  * Check the given string contains at least once of all the alphabets a-z * Case in sensitive         public static bool CheckIsPangram( string str)         {             List < string > LstAtoZ =                                Enumerable .Range( 'A' , 26)                               .Select(x => ( char )x + "" )                               .ToList();                          str = str.Replace( " " , "" );               foreach ( char chr in str)             {                 if (LstAtoZ.Contains(chr.ToString().ToUpper()))                 {                     LstAtoZ.Remove(chr.ToString().ToUpper());                 }             }             retur

Coding Challenge React Programming : String Manipulation Coding Challenge - 1!

String Manipulation Coding challenges using React-Typescript Requirement: Given a string may contain spaces, convert them to All first character caps All Even numbers caps All Odd Numbers small Consider the strings are starting with 0 - Even number  Stack Blitz Console: import   React , {  Component  }  from   'react' ; import  {  render  }  from   'react-dom' ; import   Hello   from   './Hello' ; import   './style.css' ; interface   AppProps  {} interface   AppState  {    name :  string ;    input :  string ;    result :  string ; } class   App   extends   Component < AppProps ,  AppState > {    bResult :  any ;    constructor ( props ) {      super ( props );      this . state  = {        name:   'React Programming Coding Challenge: String Manipulation Coding Challenge - 1' ,        input:   '' ,        result:   'Result: No Result, input string to process'     };      this . handleChange  =  this . handleChange . bind ( t