Showing 3 of 5 questions
Calculate the nth Fibonacci number. The Fibonacci sequence starts with 0 and 1, and each subsequent number is the sum of the previous two.
#1. Fibonacci Number
You're given a flowerbed represented by an array of 0s and 1s, where 0 means empty and 1 means planted. Determine if you can plant a given number of new flowers without violating the rule that adjacent plots cannot be planted.
#2. Can Place Flowers
Find the cheapest price to fly from a source to a destination with at most K stops. You're given a list of flights with prices and need to determine the optimal route within the stop limit.
#3. Cheapest Flights Within K Stops
Page 1 of 1 · 5 total