HashedIn by Deloitte Interview Question

programs with time and space complexity