Skip to content

Comments added and unused code commented #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Pattern/Pattern6.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ In this code you will find how you can make * pattern by using while loop

## Code
```cpp

#include <iostream>
#include <vector>
using namespace std;
Expand All @@ -16,6 +15,7 @@ class Solution {
for (int i = 1; i <= N/2; i++)
{
string temp;
// For 1st N/2 lines
for (int j = 1; j <= i - 1; j++)
{
temp+=" ";
Expand All @@ -26,13 +26,14 @@ class Solution {
temp+=" ";
}
temp+="*";
for (int j = 1; j <= i - 1; j++)
{
temp+=" ";
}
// for (int j = 1; j <= i - 1; j++)
// {
// temp+=" ";
// }
space -= 2;
ans.push_back(temp);
}
// For last N/2 lines
space = N/2;
for (int i = 1; i <= N/2; i++)
{
Expand Down