I know the lecturer mentioned this was an example of bidirectional ray tracing technique. I was wondering what the optimization is that's provided with this method in general which would in some situations make it more optimal than normal ray tracing. Here's a link to some reading on bidirectional path tracing: https://graphics.stanford.edu/courses/cs348b-03/papers/veach-chapter10.pdf
PBRT is a great open source library for ray tracing, including bidirectional ray tracing. Here is the GitHub link: https://github.com/mmp/pbrt-v3 very worth to have a try!