Open Gauthkum opened 1 year ago
int main() { int n, i,j; scanf("%d", &n); for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(j<(n-1-i)) printf(" "); else printf("#"); } printf("\n"); }
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
return 0;
}
output: #
the complexity of the code: O(n^2)
Try to solve this warmup problem (https://www.hackerrank.com/challenges/staircase/problem) from Hacker Rank and share me the code and output. Share the complexity in which your code is working.