Quora 店面

Given a pair of numbers (A, B), you can perform an operation (A+B, B) or (A, A+B). (A, B) is initialized to (1,1).

Given an N>0, find the minimum number of operations needed to perform on (A, B) until A=N or B=N.
Additionally, give the time complexity of the solution.

请问您面的是什么岗位呀

问一下楼主,这题是BFS就可以吗还是有数学规律的?