Search
⌘K

Leetcode 844. Backspace String Compare

Determine whether two strings containing letters and '#' (backspace) produce the same final text after applying backspaces. The core challenge is correctly handling deletions without rebuilding strings — typically solved in O(n) time and O(1) extra space via reverse traversal with skip counters.

Asked at:

Amazon

Amazon


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late September, 2024

Amazon

Amazon

Intern

Backspace String Compare: Compare two strings to determine if they are the same after processing all backspace operations. Each # character represents a backspace that removes the previous character.

Comments

Your account is free and you can post anonymously if you choose.