So, I asked chatgpt about the algorithm of given code and boom, it gives such an accurate answer without any error. It is updating and each time getting better. This can help many students who are trying to learn new things and help them.