Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Confusion with last input

kr.behrman

Aug 27, 2023

I'm confused by the last result , the input is "#a#c" "abc###" and the expected is True. Wouldn't they reduce to "c" and "" , which are not equal?

1

1

Comments
Comments
 sealess
sealess2 years ago

Same

Design Gurus
Design Gurus2 years ago

Where do you see this example or test case?

J
Jonathan a year ago

I have the same problem with my python code. It passes all test cases except for the below. The provided solution returns true, but mine returns false as the OP suggested it should (and how the prompt reads to me).

  print(sol.compare("a##c", "#a#c"))

On this page