Time complexity explanation of following

PROBLEMS LINK : https://pastebin.com/D7yKGE4G

Hello @Divya_321

I am sharing with you a link to a pdf which contains the solutions to the questions.
// https://minio.codingblocks.com/amoeba/9c57ac97-ac20-4674-8046-6e7555e09008.pdf
Also refer below links for
Q1. Time complexity for code
Q2. Gcd time complexity

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.