The “Elam Ending” has made its way to the NBA. Here’s how.