← HSBC questions

Remove duplicate elements in a given array

Filed under HSBC

Given a sorted array of integers, remove the duplicates in-place such that each element appears only once and return the new length. Do not allocate extra space for another array; you must do this by…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related HSBC questions

Collected from public candidate posts and coding forums. Updated Nov 2026.