Barclays Interview Question

fibonacci sequence dsa question in tech interview