r/codinginterview • • Jun 21 '20

Importance of Confidence in Approaching the Unknown

This question was asked in a software job interview.

Can you connect each small box on the top with its same-letter mate on the bottom with paths that do not cross one another, nor leave the boundaries of the large box?

7 Upvotes

6 comments sorted by

1

u/bparanj Jun 22 '20

I am going to provide some ideas. First, loosen up and don't worry about rules or constraints. Use wishful thinking. In this problem, the main difficulty is that the top boxes labeled 𝐴 and 𝐶 are in the “wrong” places. So why not move them around to make the problem trivially easy?

So the first step to solve this problem:

https://drive.google.com/file/d/1a08WwJUGoGao5EMi60X0ojlblRh4qaGG/view?usp=sharing

1

u/nowhacker Jun 22 '20

doesn't seem possible 1 box remains

2

u/bparanj Jun 22 '20

https://drive.google.com/file/d/1a08WwJUGoGao5EMi60X0ojlblRh4qaGG/view?usp=sharing

Start with my first hint above with a fresh new perspective on the problem.

1

u/nowhacker Jun 22 '20

haha yes i presumed they were fixed, but now when I see the title of the post, this makes sense.

2

u/bparanj Jun 22 '20

We have employed the all-important make it easier strategy: If the given problem is too hard, solve an easier one.