In this problem why they have taken max(V1, V2) = V - A
? I tried understanding but in vain. Can someone explain ?
I think its just a simple re-arrangement.
I mean, V= result (variable returned by function)
And-
result = result + max(hash(S1), hash(S2))
But before this, result =A (we defined it such)
==> Result = A+max(v1,v2)
==>V=A+max(v1,v2)
Hence, max(v1,v2)=V-A.
They just shuffled the terms here and there. That editorial was kinda hard to understand…idk if its because of my sleepiness atm or what.
1 Like
perfect…