As per this website below problem was asked in Nvdia & has been tagged as 'Hard'
It is actually not only Hard but impossible to solve if one doesn't know the trick.
Though Google search can easily solve that problem
Find the maximum of two numbers without using any if-else statements, branching, or direct
comparisons
& below is that solution, please suggest if it fails -
It is actually not only Hard but impossible to solve if one doesn't know the trick.
Though Google search can easily solve that problem
Find the maximum of two numbers without using any if-else statements, branching, or direct
comparisons
& below is that solution, please suggest if it fails -
Find Min & Max