Skip to content

Commit 500788d

Browse files
author
Joseph Luce
authored
Update Decompressor.md
1 parent 15f9b39 commit 500788d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

real_interview_questions/Google/Decompressor.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# QUESTION
22
Given a compressed string in which a number followed by [] indicate how many times those characters occur, decompress the string
3+
34
Eg. : a3[b2[c1[d]]]e will be decompressed as abcdcdbcdcdbcdcde.
5+
46
Assume the string is well formed and number will always be followed by a [].
57

68
# SOLUTION
@@ -15,7 +17,6 @@ def decompress(compressed_string):
1517
return ''
1618
token_stack = list()
1719
result_stack = list()
18-
# token_stack.append(tokens[0])
1920
curr_token_index = 0
2021
while curr_token_index < len(tokens):
2122
curr_token = tokens[curr_token_index]

0 commit comments

Comments
 (0)