INPSTFIX What does a comma mean in an infix expression

Please can someone point me at something that explains what a comma means, in an infix expression?

I don’t think comma means anything in a infix notation. However it would be better if provide more context to the problem you are facing.

https://www.codechef.com/LRNDSA02/problems/INPSTFIX

The constraints say
S contains only uppercase English letters (A…Z), and these characters - (,),+,−,∗,/,^. S is a valid infix expression.

You are interpreting the constraints in the wrong way. , simply is for separation, the same it is used in English. :slight_smile:

What the constraints says that the string S will consist of upper case english alphabets i.e (A, B, C,\dots ,Z) and those operators ( (, \; ),\; +,\; −,\; ∗,\; /,\; \land) which are separated by , and S will always be a valid infix expression.

1 Like

I can’t seem to see how “,” is not meant as an operator here, the way it is written clearly says so

S contains only uppercase English letters (A…Z), and these characters - (,),+,−,∗,/,^. S is a valid infix expression.

Meaning the following are operators (excluding the quotes of course): “,” and “+” and “-” and “*” and “/” and “^”

why else would the comma be put in parenthesis like that (,) ?

Could you clarify more?

Thank you :smiley:

waaaaaait! , it means the parenthesis themselves! :laughing:

what an “optical illusion” stupid mind :rofl:

Good you find out the most common trait about overthinking :sweat_smile:

1 Like

You’re not the only one. I read it that way several times, before asking this question!

1 Like

Basically "," operator has also a very important meaning when you are writing multiple instructions or formulas in a line like:

#include <iostream>

int main(void) {
    std :: cout << "Hello there!" << std :: endl, std :: cout << "How are you? " << std :: endl;
    return 0;
}

It basically acts as a Sequence Point, if that was a meaning given to "," then problem would have been a bit trickier to solve.