Menu
Question Index
...

Write a program to get the number of words possible using a alphabets array.
Assume that there are no duplicate alphabets.

Input(char Array) Output
{ 'r', 'a', 'i', 'n', 'b', 'o', 'w' } 5040
{ 'f', 'r', 'u', 'i', 't', 's' } 720
{ 'n', 'e', 'w', 's' } 24
{ 'a', 'e', 'i', 'o', 'u' } 120
{ 's', 'u', 'n', 'f', 'l', 'o', 'w', 'e', 'r' } 362880
{}(EMPTY ARRAY) 1



class CombinationsWithoutDuplicates
{
    public static void main(String s[])
    {
        char inputArray[] = {'r',
                     'a',
                     'i',
                     'n',
                     'b',
                     'o',
                             'w'};
        System.out.println("The number of combinations are : " + getCombinationCount(inputArray));                

    }


        public static int getCombinationCount(char array[])
        {
        }
    
    
        public static int getFactorial(int number)
        {
            int fact = 1;
            return fact;
        }

}

Doubts

Problems

Topic: Learn Arrays And Loops

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App