From 0fbe43a9fee3b54f2ff2481d62a73ce20f88c532 Mon Sep 17 00:00:00 2001 From: problsolv Date: Sat, 22 Nov 2025 21:34:31 -0600 Subject: [PATCH] Update exam/packet.tex --- exam/packet.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exam/packet.tex b/exam/packet.tex index afa0863..817397d 100644 --- a/exam/packet.tex +++ b/exam/packet.tex @@ -145,10 +145,10 @@ Output: \problem{Problem 3: Merge Intervals} \textit{Difficulty: Hard} -You are given a string S composed of only the characters ‘6’, ‘7’, 'A’, 'B’, and ‘#’ (without the quotation marks). This string is processed from left to right, and you must maintain a sequence of chracters that changes according to these rules: +You are given a string S composed of only the characters \‘6\’, \‘7\’, \'A\’, \'B\’, and \‘#\’ (without the quotation marks). This string is processed from left to right, and you must maintain a sequence of chracters that changes according to these rules: 1. The sequence starts out empty. 2. 6 - add a 6 to the end of the sequences -3. 7 - if the sequence is non-empty and its last chracter is ‘6’, remove that last ‘6’, otherwise, add ‘7’ to the end of the sequence +3. 7 - if the sequence is non-empty and its last chracter is \‘6\’, remove that last \‘6\’, otherwise, add \‘7\’ to the end of the sequence 4. A - reverse the sequence 5. B - add a duplicate of the current sequence to the end of it 6. # - clear the sequence