HashedIn by Deloitte Interview Question

To Solve the 2 dsa questions