We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The problem states that the two spheres are initially not in contact, but: For the first case, we can ignore the 0-valued Y and Z components of position and acceleration so that we have a 1-D problem where X1=0 and x2=-1. So, at time=0, the distance dc between the centers of the two spheres is 1. However, the distance between the two sphere's outer surfaces is dc MINUS (r1+r2), or -2. Thus, the two spheres initially overlap (in fact, sphere 2 contains sphere 1). This contradicts the problem statement. Am I missing something?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Spheres
You are viewing a single comment's thread. Return to all comments →
The problem states that the two spheres are initially not in contact, but: For the first case, we can ignore the 0-valued Y and Z components of position and acceleration so that we have a 1-D problem where X1=0 and x2=-1. So, at time=0, the distance dc between the centers of the two spheres is 1. However, the distance between the two sphere's outer surfaces is dc MINUS (r1+r2), or -2. Thus, the two spheres initially overlap (in fact, sphere 2 contains sphere 1). This contradicts the problem statement. Am I missing something?