Skip to content

Conversation

@srijanakde2001
Copy link
Contributor

close #195

@srijanakde2001
Copy link
Contributor Author

Please let me know how to make the changes if some further changes are to be made

smsubset.cpp Outdated
{
if(j==0)
cout<<i+1<<" ";
else
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

Copy link
Owner

@rishabhgarg25699 rishabhgarg25699 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srijanakde2001 Remove extra space and extra lines

See if more changes are to be made.
Copy link
Owner

@rishabhgarg25699 rishabhgarg25699 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srijanakde2001 Please correct them

smsubset.cpp Outdated
return;
}
int main()
{int n,x,i,j=0,arr[20],ans[20],m=0,narr[20];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srijanakde2001 No indentation

smsubset.cpp Outdated
{int n,x,i,j=0,arr[20],ans[20],m=0,narr[20];
cin>>n>>x;
for(i=n-1;i>=0;i--)
{cin>>arr[i];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No indentation

smsubset.cpp Outdated
if(g==21)
cout<<"-1";
else
{for(i=0;i<n;i++)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No indentation

smsubset.cpp Outdated
cout<<"-1";
else
{for(i=0;i<n;i++)
{if(narr[i]==garr[j])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No indentation

smsubset.cpp Outdated
else
{for(i=0;i<n;i++)
{if(narr[i]==garr[j])
{if(j==0)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No indentation

else
cout<<i+1<<" ";
j++;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No indentation

@srijanakde2001
Copy link
Contributor Author

Thank you, I didn't no all the rules of indentation, hope now it's correct

@srijanakde2001
Copy link
Contributor Author

??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smallest subset of an array whose sum equals that of the given value in Order of n

2 participants