Dsa
Strings
Medium
Backspace Path Equality
Two explorers type their paths into a device. The device uses '@' as a backspace character (deletes the previous character). For example, 'abc@d' becomes 'abd'. Given two strings representing their typed paths, determine if they result in the same final path. Print 'TRUE' or 'FALSE'.
Example:
Input:
a-b@c
a-c
Output:
TRUE
(Explanation: both result in 'a-c'.)
Key concepts
string-processingstack
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