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
|
5170 Discussions
|
Please Login in order to post a comment
time Complexity = O(n)
Here is the website that published all the problems solutions - Programmingoneonone
Java 15
public static void staircase(int n) { int repeat = 1; for(int i=n ; i > 0; i-- ) { System.out.println(" ".repeat(i-1)+"#".repeat(repeat++)); }
**//C# **