Nextlabs interview question

How do you calculate GCD?