← Mastercard questions

Fibonacci recursive and iterative; nth node from the end

Filed under Mastercard

Two tasks. (1) Print the first n Fibonacci numbers using both a recursive and an iterative approach. (2) Given the head of a singly linked list and n, return the nth node from the end in a single…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Mastercard questions

Collected from public candidate posts and coding forums. Updated Nov 2026.