Storing the vowels in the map with custom numbers showing their index
Dictionary < char , int > m = new Dictionary < char , int > ( ) ; m . Add ( ' a ' , 0 ) ; m . Add ( ' e ' , 1 ) ; m . Add ( ' i ' , 2 ) ; m . Add ( ' o ' , 3 ) ; m . Add ( ' u ' , 4 ) ; char [ ] arr = { ' a ' , ' e ' , ' i ' , ' o ' , ' u ' } ; int N = str . Length ;