Find the Output

Explaination

Find the Output

Explaination

Staircase Detail

This is a staircase of size n=4

   #
  # #
 # # #
# # # #

Sample Input
6
Sample Output
     #
    # #
   # # #
  # # # #
 # # # # #
# # # # # #


Explaination
The staircase is right-aligned, composed of # symbols and spaces, and has a height and width of n=6 .

Zoho Coding Interview Question

This is a staircase of size n=4

Assume input will be a word with odd letter count.

Input:
PROGRAM
Output

      G
     GR
    GRA
   GRAM
  GRAMP
 GRAMPR
GRAMPRO