As reported: Sony India Software Centre, Intern, 2026, technical round (about 35 minutes, virtual): HTTP vs HTTPS, OOP concepts and a project discussion, plus easy coding — the Fibonacci series (iterative or recursive) and an array problem. Optimal solutions were not expected at the intern level.
This is LeetCode 509 — Fibonacci Number. Our write-up: /fibonacci-number.
The Fibonacci numbers are defined by F(0) = 0, F(1) = 1, and F(n) = F(n − 1) + F(n − 2) for n > 1. Given n, return F(n).
Example 1
n = 2
Output: 1
F(2) = F(1) + F(0) = 1 + 0.
Example 2
n = 3
Output: 2
Example 3
n = 4
Output: 3
Constraints: 0 <= n <= 30.
Code runner format: one integer, n. Implement fib(n) returning an integer.