Skip to content

Some comments for better understanding#199

Closed
akash19jain wants to merge 1 commit intoTheAlgorithms:masterfrom
akash19jain:patch-1
Closed

Some comments for better understanding#199
akash19jain wants to merge 1 commit intoTheAlgorithms:masterfrom
akash19jain:patch-1

Conversation

@akash19jain
Copy link
Contributor

No description provided.

Copy link
Collaborator

@christianbender christianbender left a comment

Choose a reason for hiding this comment

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

Good Work! I have some suggestions

}

int isBalanced(char *s) {
int isBalanced(char *s) //function which returns if the entered expression is balanced or not
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you use multi-line comments such as:

/*
   DESCRIPTION
*/
int isBalanced(char *s)

Thanks


x=pop();
if( x=='{'&&s[i]!='}')
if( x=='{'&&s[i]!='}') //to check if the opening bracket of the same type at the closing one is popped.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you put in spaces between the operators and conditions, such as

x == '{' && s[i] != '}'

for more readability

@christianbender christianbender added on hold Practice coding For needless changes and removed on hold labels Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Practice coding For needless changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants