Please provide constraints


It’s very difficult to think otherwise and at times annoying as well


For this particular question do you really need constraints, see A is given as Integer type when you open the code editor and therefore all fibonacci number needed will be less than A. So, lets say 100th fibonacci number is 354224848179261915075, now you can say that output array/queue, whatever you are making will be lesser than size 100 and for any constraints below that O(n) code will work fine :). I am talking in context of this problem only.