HashedIn by Deloitte Interview Question

1. Given a array find all the duplicates and remove it in the same array move all the distinct elements to the leftmost index 2. Find if the given linked list have loop 3. Code to validate if a given binary tree is valid

Interview Answer

Anonymous

Jan 23, 2026

Used a hashset to identify duplicates and marked the duplicate with -1, then moved the distinct elements to left most Used slow and fast pointers to identify the cycle Used a recursive algorithm by keeping track of min and max values to validate binary dree Design DEsigned a robust approach to reduce latency and cached the most frequently requested result, replicated the database to handle db failure (Master - Slave Architecture), CDN to serve static content, Gateway and loadbalancer to route request to available server instances and sigle point of entry.