Data Structures & AlgorithmsHardCodeforces Div2 D · Fibonacci
Problem: What does the Pisano period of m describe?
- A. The number of primes below m
- B. The period of the Fibonacci sequence modulo m
- C. The order of 2 modulo m
- D. The number of divisors of m
Correct answer: B. The period of the Fibonacci sequence modulo m
F(n) mod m is periodic, and its period is the Pisano period pi(m).
More Coding Interview Problems questions
- Problem: Which characterisation of bipartite graphs is correct?
- Problem: What does the Erdos-Szekeres theorem state?
- Problem: What does Dilworth's theorem say about a finite partially ordered set?
- Problem: What is the time complexity of range-assign and range-sum queries with a lazy segment tree?
- Problem: What does the two-heap technique compute in a data stream?
- Problem: Which structure gives the best rational approximations to a real number in a tree form?