We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Warmup
- Staircase
- Discussions
Staircase
Staircase
Sort by
recency
|
4946 Discussions
|
Please Login in order to post a comment
Java Solution (Complexity: O(n^2))
Mail: mst29310@gmail.com
for(int i=1;i<=n;i++) { for(int j=1;j<=(n-i);j++) { System.out.print(" ");
Python3
**To solve this problem and print a staircase of size
This function
staircase(n)
takes an integerYou can run this program by providing an integer input for the size of the staircase, and it will output the staircase pattern accordingly.**