Design Patterns

Design Patterns

C Program of N Queens Problem Solution using Backtracking

C program of N queens problem solution : The N Queens Puzzle is the problem of putting N chess queens on an N×N chessboard such that none of them is able to capture any other using the standard chess queen's moves. The queens must be placed in such a way that no two queens would be able to attack...

C program to print reverse pyramid of alphabets

C program to print reverse pyramid of alphabets :  In my previous two programs, we have seen that how to create pyramid using stars and pyramid using numbers (also called Pascal's triangle). Now, we will learn how to extend that logic to make a reverse pyramid of alphabets. Logic will be somewhat similar to previous two programs but we...

C program to Print Pascal Triangle | C code champ

C program to print pascal triangle : In our previous code, we have seen how to draw a pyramid using C program. Now we will see how to extend our previous logic to print pascal's triangle using C code. But first of all, we must know what is pascal triangle is ? (From Wikipedia) In mathematics, Pascal's triangle is a...

C code to draw pyramid using stars | C code champ

C code to draw pyramid using stars : Friends today we will learn how to draw a cool pyramid using C programming. Drawing a pyramid is not a big deal but taking number of lines as variable input from user makes it bit tricky. But using two simple for loops we can easily draw a pyramid using stars. Just...