zoom call where link to hackerrank was shared
two questions to be solved in one hour, if stuck interviewer will help you
Q1.
A person is given pile of stones with different sizes where he has to destroy them.He will destroy them like this
he will chose 2 stones with maximum sizes and those 2 stones will be replaced with a single stone having size as difference of the their size.
if the chosen stones have equal size they will be destroyed completely.
return the size of the last remaining stone if no stone is remaining return 0.
ex: stone_array = [3,4,5,7,7]
7 and 7 will be destroyed.
5 and 4 are reduced to (5-4) 1 and array becomes [3,1]
3 and 1 are reduced to 2..so the final answer is 2.
Q2.
It was little stricky . A variation of stock span.