Skip to content

About

This repo is to showcase my hackerrank solutions in C.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

Hackerrank-Solutions-in-C

This repo is to showcase my solutions in C for interesting Hackerrank Questions. Coz I love C language 🩷🩷🩷 I upload the solution for the hackerrank questions only if it is difficult to medium level(for me).

Those were not generated from AI, so you can definitely look into my solutions without a second thought.

1) Spiral Pattern using asterisk

Link -> https://www.hackerrank.com/contests/pattern/challenges/displaypattern

Input : 7

Output :

* * * * * * * 
            * 
* * * * *   * 
*       *   * 
*   * * *   * 
*           * 
* * * * * * * 

Input : 12

Output :

* * * * * * * * * * * * 
                      * 
* * * * * * * * * *   * 
*                 *   * 
*   * * * * * *   *   * 
*   *         *   *   * 
*   *   *     *   *   * 
*   *   * * * *   *   * 
*   *             *   * 
*   * * * * * * * *   * 
*                     * 
* * * * * * * * * * * *

Solution : SpiralPatternUsingAsterisk.c

2) Number Pattern

Link -> https://www.hackerrank.com/challenges/printing-pattern-2/problem

Input : 7

Output :

7 7 7 7 7 7 7 7 7 7 7 7 7 
7 6 6 6 6 6 6 6 6 6 6 6 7 
7 6 5 5 5 5 5 5 5 5 5 6 7 
7 6 5 4 4 4 4 4 4 4 5 6 7 
7 6 5 4 3 3 3 3 3 4 5 6 7 
7 6 5 4 3 2 2 2 3 4 5 6 7 
7 6 5 4 3 2 1 2 3 4 5 6 7 
7 6 5 4 3 2 2 2 3 4 5 6 7 
7 6 5 4 3 3 3 3 3 4 5 6 7 
7 6 5 4 4 4 4 4 4 4 5 6 7 
7 6 5 5 5 5 5 5 5 5 5 6 7 
7 6 6 6 6 6 6 6 6 6 6 6 7 
7 7 7 7 7 7 7 7 7 7 7 7 7

Solution : NumberPattern.c

More Solutions are on the way!!!

About

This repo is to showcase my hackerrank solutions in C.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages