Samsung Electronics Interview Question

Explain how SLAM algorithm works