Why fightResolve('A', 'a') must return 'a' in test cases? The description says: "If a matchup occurs that was not previously mentioned (for example Archers vs Pikemen) the attacker will always win." So attacker is first argument, 'A' in this case. Or did I miss something?
it inverses the bool.
code representation:
bool b = true;
std::cout << b << '\n'; // true
std::cout << !b << '\n'; // false
it's called the NOT operator.
visual representation:
true ------[!]------> false
false ------[!]------> true
This comment is hidden because it contains spoiler information about the solution
If this was solved on your own and not via GPT Chat, you are a genius.
it is a container like vector i think (Data Structure)
Is string a vector?
This comment is hidden because it contains spoiler information about the solution
simple as that... nice one
This comment is hidden because it contains spoiler information about the solution
where is conversion of Boolean to a String?
Why fightResolve('A', 'a') must return 'a' in test cases? The description says: "If a matchup occurs that was not previously mentioned (for example Archers vs Pikemen) the attacker will always win." So attacker is first argument, 'A' in this case. Or did I miss something?
Of course, as you please. It's just a way of bounding logic together for good readability
() can be omitted
This comment is hidden because it contains spoiler information about the solution
Cool and fast solution!!
"This kata strictly takes two words with one space in between them."
Loading more items...