PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Plymouth Rock Assurance Corporation

Compute Fibonacci Numbers

Last updated: May 3, 2026

Quick Overview

This question evaluates a candidate's understanding of algorithmic problem-solving, recurrence relations, numeric computation, and performance analysis, including discussion of time and space complexity and handling of large inputs or integer overflow.

  • medium
  • Plymouth Rock Assurance Corporation
  • Coding & Algorithms
  • Data Scientist

Compute Fibonacci Numbers

Company: Plymouth Rock Assurance Corporation

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Write a function that returns the `n`th Fibonacci number. Definitions and requirements: - Use zero-based indexing: `fib(0) = 0`, `fib(1) = 1`. - For `n >= 2`, `fib(n) = fib(n - 1) + fib(n - 2)`. - The input `n` is a non-negative integer. - Discuss the time and space complexity of your approach. - If relevant, explain how your implementation handles large `n` values or integer overflow.

Quick Answer: This question evaluates a candidate's understanding of algorithmic problem-solving, recurrence relations, numeric computation, and performance analysis, including discussion of time and space complexity and handling of large inputs or integer overflow.

Plymouth Rock Assurance Corporation logo
Plymouth Rock Assurance Corporation
Jan 3, 2026, 12:00 AM
Data Scientist
Technical Screen
Coding & Algorithms
0
0

Write a function that returns the nth Fibonacci number.

Definitions and requirements:

  • Use zero-based indexing: fib(0) = 0 , fib(1) = 1 .
  • For n >= 2 , fib(n) = fib(n - 1) + fib(n - 2) .
  • The input n is a non-negative integer.
  • Discuss the time and space complexity of your approach.
  • If relevant, explain how your implementation handles large n values or integer overflow.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Plymouth Rock Assurance Corporation•More Data Scientist•Plymouth Rock Assurance Corporation Data Scientist•Plymouth Rock Assurance Corporation Coding & Algorithms•Data Scientist Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.