Answer the question
In order to leave comments, you need to log in
Shorthand if?
return a.size() == b.size() ? a < b : a.size() < b.size();
Answer the question
In order to leave comments, you need to log in
This is a ternary operator.
In expanded form it will be like this:
if (a.size() == b.size()) {
return a < b;
} else {
return a.size() < b.size();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question