This example uses the while loop to find a given character.
Using for loop we are able to find the maximum value out of all elements. No inbuilt functions like sort() etc. are used in here.
The placing of one loop inside the body of another loop is called nesting. When you "nest" two loops, the outer loop takes control of the number of complete repetitions of the inner loop.
This is an example of lexicographic order which is a way to sort strings using the order used in a dictionary, where strings are compared in alphabetical order, from left to right.
a1a2 ... ak
A palindrome is a word, phrase, number, or other sequence of units that may be read the same way in either direction.
Eg:
abab when read from reverse direction is baba, so not a palindrome.
This example prints a right triangular asterisks pattern using for loops.