# Can you solve the "Hanging Cable" problem, used as an Amazon interview question?

**URL:** <https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523>\
**Category:** News & Articles\
**Tags:** tools, business\
**Created:** [February 20, 2020, 12:19am UTC](https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523 "2020-02-20T00:19:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheJoker](https://onehack.st/user_avatar/onehack.st/thejoker/32/22660_2.png) [@TheJoker](https://onehack.st/u/TheJoker)\
**Post date:** [February 20, 2020, 12:19am UTC](https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523/1 "2020-02-20T00:19:26Z")

</div>

An anonymous reader [shares a problem that Amazon asks in its interviews](https://boingboing.net/2020/02/18/can-you-solve-the-hanging-ca.html):

[![](https://i2.wp.com/media.boingboing.net/wp-content/uploads/2020/02/hanging-cable.jpg?w=700&ssl=1) ](https://i2.wp.com/media.boingboing.net/wp-content/uploads/2020/02/hanging-cable.jpg?w=700&ssl=1)

> _A cable of 80 meters is hanging from the top of two poles that are both 50 meters off the ground. What is the distance between the two poles (to one decimal point) if the center cable is (a) 20 meters off the ground and (b) 10 meters off the ground?_

---

<div class="post-metadata">

**Author:** ![Hyperdemongod](https://onehack.st/user_avatar/onehack.st/hyperdemongod/32/26170_2.png) [@Hyperdemongod](https://onehack.st/u/Hyperdemongod)\
**Post date:** [February 20, 2020, 1:33pm UTC](https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523/2 "2020-02-20T13:33:13Z")

</div>

@TheJoker  
Did u share the news just for sharing or to get our response?

---

<div class="post-metadata">

**Author:** ![nagendra\_kumar](https://onehack.st/user_avatar/onehack.st/nagendra_kumar/32/32077_2.png) [@nagendra\_kumar](https://onehack.st/u/nagendra_kumar)\
**Post date:** [February 20, 2020, 1:45pm UTC](https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523/3 "2020-02-20T13:45:52Z")

</div>

10 meters above the ground

---

<div class="post-metadata">

**Author:** ![nagendra\_kumar](https://onehack.st/user_avatar/onehack.st/nagendra_kumar/32/32077_2.png) [@nagendra\_kumar](https://onehack.st/u/nagendra_kumar)\
**Post date:** [February 20, 2020, 1:46pm UTC](https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523/4 "2020-02-20T13:46:25Z")

</div>

sry 10 meters off the ground

---

<div class="post-metadata">

**Author:** ![BadFella](https://onehack.st/user_avatar/onehack.st/badfella/32/88045_2.png) [@BadFella](https://onehack.st/u/BadFella)\
**Post date:** [February 20, 2020, 2:32pm UTC](https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523/5 "2020-02-20T14:32:19Z")

</div>

> You can also solve A without hard math, just geometry.

First, drop the factors of 10 so it’s 5 tall and 2 off the ground and 8 long

Find the upper bound:  
Imagine the rope taught in two triangles. Then one of those triangles has a base of 2.64 = sqrt(16-9)

Find lower bound:  
Replace the rope with 4 sticks each 2 long.  
pin the left and right sticks to their flagpoles. this leaves two triangles for the remaining sticks to form.  
length of the base of one triangle 1.76 = sqrt( 4 -1)

So the full width is twice those bounds: 5.2 \> X \>3.5

Pick a value in the middle 4.35

That’s got 1 digit accuracy on the right answer.

> For Part B it will be 0.0 m

---

<div class="post-metadata">

**Author:** ![DevilDuck](https://onehack.st/user_avatar/onehack.st/devilduck/32/29698_2.png) [@DevilDuck](https://onehack.st/u/DevilDuck)\
**Post date:** [February 20, 2020, 4:30pm UTC](https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523/6 "2020-02-20T16:30:23Z")

</div>

I got the answer 52.9 meters  
is it right ???

---

<div class="post-metadata">

**Author:** ![BadFella](https://onehack.st/user_avatar/onehack.st/badfella/32/88045_2.png) [@BadFella](https://onehack.st/u/BadFella)\
**Post date:** [February 20, 2020, 4:36pm UTC](https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523/7 "2020-02-20T16:36:10Z")

</div>

> It will be near about 42 \< X \> 44.

---

<div class="post-metadata">

**Author:** ![zme](https://onehack.st/user_avatar/onehack.st/zme/32/25180_2.png) [@zme](https://onehack.st/u/zme)\
**Post date:** [February 20, 2020, 4:39pm UTC](https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523/8 "2020-02-20T16:39:13Z")

</div>

Answer

(a) 52.9m

(b) 0m

---

<div class="post-metadata">

**Author:** ![DevilDuck](https://onehack.st/user_avatar/onehack.st/devilduck/32/29698_2.png) [@DevilDuck](https://onehack.st/u/DevilDuck)\
**Post date:** [February 20, 2020, 4:41pm UTC](https://onehack.st/t/can-you-solve-the-hanging-cable-problem-used-as-an-amazon-interview-question/70523/9 "2020-02-20T16:41:29Z")

</div>

> [@DevilDuck](#):
>
> I got the answer 52.9 meters

ummmm… nevermind , looked it up on yt  
the ans is 45.4 meters
