popular pattern programs for coding Interview

popular pattern programs for coding Interview
popular pattern programs for coding Interview

Pattern 1

1 
1 
1 2 
1 2 3 
1 2 3 
1 2 3 4 
1 2 3 4 5 
1 2 3 4 5

Code for pattern 1

Pattern 2

1 2 3 4 5 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 3 
1 2 
1 
1 

Code for pattern 2

Pattern 3

0     
10    
010   
1010  
01010

Code for pattern 3

Pattern 4

5 4 3 2 1 
5 4 3 2 
5 4 3 
5 4 
5

Code for pattern 4

Pattern 5

1 
1 0 
1 2 3 
1 0 1 0 
1 2 3 4 5

Code for pattern 5

Pattern 6

10 
9 9 
8 8 8 
7 7 7 7 
6 6 6 6 6

Code for pattern 6

Pattern 7

O
P P
Q Q Q 
R R R R
S S S S S

Code for pattern 7

Pattern 8

1#

2# 3#

4# 5# 6#

7# 8# 9# 10#

Code for pattern 8

Leave a Reply