Menu
Question Index
...

Write a program to check whether the given word is in pyramid order or not. The characters in the word should be in ascending order and then in descending order.

Input (String) Output (Boolean)
lyric true
nursing false
abcdcba true
abczyxu true
ackmnt false
crooked true
smile false



class IsPyramidWord
{
    public static void main(String s[])
    {
        String inputWord = "insured";
        System.out.println("Is '" + inputWord + "' in pyramid order : " + isInPyramidOrder(inputWord));;

    }


    public static boolean isInPyramidOrder(String inputWord) {
    }

}

Doubts

Problems

Topic: charAt() Method In Java - Java Character Extraction

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App