Question bank › Trie
Dsa Trie Hard

Sensitive Data Filter

A company wants to filter sensitive data from users. Given a list of sensitive words and a text, create a function that replaces every occurrence of sensitive words in the text with asterisks (*) of the same length. The input consists of sensitive words followed by a text. Output should be the sanitized text. Example: Input: sensitive data confidential This is a sensitive and confidential document. Output: This is a ****** and ************ document.

Key concepts

triedata sanitizationstrings

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.