Skip to content

Latest commit

 

History

History
307 lines (253 loc) · 4.15 KB

PatternQuestions.md

File metadata and controls

307 lines (253 loc) · 4.15 KB

All Pattern Questions - ⭐ Star | 🔢 Number | 🔠 Alphabet

Ninja Steps to Make Any Pattern 😅

  1. Outer Loop => Responsible for Rows | No. of lines printing Horizontally.
  2. Inner Loop => Responsible for Colms | No. of Elements printing Vertically.
  3. Check the Value which u need to print - ⭐ Star, 🔢 Number, 🔠 Alphabet.
  4. Check is any relation btw Rows & Colms.
  5. Check which order is following in the pattern ( 🔢 Number | 🔠 Alphabet )
  6. Think 🤔, Is this pattern can be formed by mixing other patterns. (only when you have failed in 4th & 5th step )

SQUARE Patterns

1.1  * * * * *
     * * * * *
     * * * * *
     * * * * *
     * * * * *

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

1.3  A B C D E
     A B C D E
     A B C D E
     A B C D E

Right Trianlge

2.1  *
     * *
     * * * 
     * * * *
     * * * * *

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

2.3  1
     2  3
     4  5  6
     7  8  9  10
     11 12 13 14 15

2.4    A
       B C
       D E F
       G H I J
       k L N N O

2.5    E
       D E
       C D E
       B C D E
       A B C D E

 2.6   1
       0 1
       1 0 1
       0 1 0 1
       1 0 1 0 1

Reverse Right Trianlge


3.1  * * * * *
     * * * *
     * * *
     * *
     *

3.2   1 2 3 4 5
      1 2 3 4
      1 2 3
      1 2
      1 
      
3.3   1 1 1 1 1 1
      2 2 2 2 2
      3 3 3 3
      4 4 4
      5 5
      6
      
3.4    E D C B A
       D C B A
       C B A
       B A
       A

Trianlge


4.1  *
     * *
     * * *
     * * * *
     * * * * *
     * * * *
     * * *
     * *
     *

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

Right Triangle Mirror Image | Space + ⭐ |🔠 | 🔢



5.1          *
           * *
         * * *
       * * * *
     * * * * *

5.2      *       
        * *
       * * *
      * * * *
     * * * * *


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

5.4           1
            1   1
          1   2   1
        1   3   3   1
      1   4   6   4   1

Reverse Right Triangle Mirror Image | Space + ⭐ |🔠 | 🔢

 
6.1  * * * * *
       * * * *
         * * *
           * *
             *

6.2  * * * * *
      * * * *
       * * *
        * *
         *

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

Hour Glass -⭐ |🔠 | 🔢


1.   * * * * *
      * * * *
       * * *
        * *
         *
         *
        * *
       * * *
      * * * *
     * * * * *


Other ⭐ Patterns


1.     ****
       *  *
       *  *
       *  *
       ****
       
2.       *
        * *
       *   *
      *     *
     *********


3.   *********
      *     *
       *   *
        * *
         *

4.        *****
         *   *
        *   *
       *   *
      *****

5.       *
        * *
       *   *
      *     *
     *       *
      *     *
       *   *
        * *
         *

Important Patterns - CHALLENGE

 
1.       1
        212
       32123
      4321234
       32123
        212
         1

     
2.     1             1
       1 2         2 1
       1 2 3     3 2 1
       1 2 3 4 4 3 2 1

3.       4 4 4 4 4 4 4  
         4 3 3 3 3 3 4   
         4 3 2 2 2 3 4   
         4 3 2 1 2 3 4   
         4 3 2 2 2 3 4   
         4 3 3 3 3 3 4   
         4 4 4 4 4 4 4  

         
4.    **********
      ****  ****
      ***    ***
      **      **
      *        *
      *        *
      **      **
      ***    ***
      ****  ****
      **********


5.     *        *
       **      **
       ***    ***
       ****  ****
       **********
       ****  ****
       ***    ***
       **      **
       *        *


6.     *        *
       **      **
       * *    * *
       *  *  *  *
       *   **   *
       *   **   *
       *  *  *  *
       * *    * *
       **      **
       *        *


7.       *
        * *
       * * *
      * * * *
     * * * * *
      * * * *
       * * *
        * *
         *

8.        *
        * * *
      * * * * *
    * * * * * * * 
  * * * * * * * * *