<gouthampradhan>dynamic_programming_CountVowelsPermutation_1.java
public int countVowelPermutation(int n) {
    if (n == 1) return 5;
    Map<Character, List<Character>> graph = new HashMap<>();
    List<Character> vowels = Arrays.asList('a', 'e', 'i', 'o', 'u');
    Map<Character, Integer> count = new HashMap<>();
    vowels.forEach(v -> graph.put(v, new ArrayList<>()));
    graph.get('a').add('e');
    graph.get('e').add('a');
    graph.get('e').add('i');
    graph.get('i').add('a');
    graph.get('i').add('e');
    graph.get('i').add('o');
    graph.get('i').add('u');
    graph.get('u').add('a');
    graph.get('o').add('i');
    graph.get('o').add('u');
    count.put('a', 1);
    count.put('e', 2);
    count.put('i', 4);
    count.put('o', 2);
    count.put('u', 1);
    int[] charCount = new int[5];
    for (int i = 2; i < n; i++) {
      int j = 0;
      Arrays.fill(charCount, 0);
      for (char c : vowels) {
        List<Character> children = graph.get(c);
        for (char child : children) {
          charCount[j] = ((charCount[j] + count.get(child)) % 1000000007);
        }
        j++;
      }
      j = 0;
      for (char c : vowels) {
        count.put(c, charCount[j++]);
      }
    }
    int sum = 0;
    for (char c : vowels) {
      sum = ((sum + (count.get(c))) % 1000000007);
    }
    return sum;
  }
public int sample_funcname ( int var_0 ) {
  if ( var_0 == 1 ) return 5 ;
  Map < Character , List < Character >> var_7 = new HashMap < > ( ) ;
  List < Character > var_15 = Arrays . asList ( 'a' , 'e' , 'i' , 'o' , 'u' ) ;
  Map < Character , Integer > var_17 = new HashMap < > ( ) ;
  var_15 . forEach ( var_19 -> var_7 . put ( var_19 , new ArrayList < > ( ) ) ) ;
  var_7 . get ( 'a' ) . add ( 'e' ) ;
  var_7 . get ( 'e' ) . add ( 'a' ) ;
  var_7 . get ( 'e' ) . add ( 'i' ) ;
  var_7 . get ( 'i' ) . add ( 'a' ) ;
  var_7 . get ( 'i' ) . add ( 'e' ) ;
  var_7 . get ( 'i' ) . add ( 'o' ) ;
  var_7 . get ( 'i' ) . add ( 'u' ) ;
  var_7 . get ( 'u' ) . add ( 'a' ) ;
  var_7 . get ( 'o' ) . add ( 'i' ) ;
  var_7 . get ( 'o' ) . add ( 'u' ) ;
  var_17 . put ( 'a' , 1 ) ;
  var_17 . put ( 'e' , 2 ) ;
  var_17 . put ( 'i' , 4 ) ;
  var_17 . put ( 'o' , 2 ) ;
  var_17 . put ( 'u' , 1 ) ;
  int [ ] var_26 = new int [ 5 ] ;
  for ( int var_27 = 2 ;
  var_27 < var_0 ;
  var_27 ++ ) {
    int var_29 = 0 ;
    Arrays . fill ( var_26 , 0 ) ;
    for ( char var_31 : var_15 ) {
      List < Character > var_32 = var_7 . get ( var_31 ) ;
      for ( char var_33 : var_32 ) {
        var_26 [ var_29 ] = ( ( var_26 [ var_29 ] + var_17 . get ( var_33 ) ) % 1000000007 ) ;
      }
      var_29 ++ ;
    }
    var_29 = 0 ;
    for ( char var_31 : var_15 ) {
      var_17 . put ( var_31 , var_26 [ var_29 ++ ] ) ;
    }
  }
  int var_35 = 0 ;
  for ( char var_31 : var_15 ) {
    var_35 = ( ( var_35 + ( var_17 . get ( var_31 ) ) ) % 1000000007 ) ;
  }
  return var_35 ;
}
