Manafall Daily Quest

Garden Watering Scheduler

Function Name: calculateWateringSchedule

Description

Write a function to to help schedule garden watering times throughout a given week.

The garden requires watering every other day, starting on Monday, at the same time each scheduled day.

You should output a schedule that lists the day of the week and the corresponding time for watering.

The function must take two parameters: the start time for watering on the first day (a string in 'HH:MM' 24-hour format), and a positive integer representing the number of weeks to schedule.

Requirements

  • The output should be an array or list of strings, each formatted as 'Day: HH:MM'.
  • Days should be in this order: Monday, Wednesday, Friday, Sunday, Tuesday, Thursday, Saturday, then it wraps around starting with Monday again.
  • The number of scheduled watering times should equal the number of weeks multiplied by 4.
  • Take into account that weeks start on Monday.
  • You should not use date-time built-in libraries; treat this as a simple string manipulation and math problem.

Examples

Function call: calculateWateringSchedule('06:30', 2)Output: ['Monday: 06:30', 'Wednesday: 06:30', 'Friday: 06:30', 'Sunday: 06:30', 'Tuesday: 06:30', 'Thursday: 06:30', 'Saturday: 06:30', 'Monday: 06:30']

Balanced Parentheses

Thu Aug 29 2024

Write a function that takes a string containing only '(', ')', '{', '}', '[' and ']', determines if the input string is valid. An input string is valid if:1. Open brackets must be closed by the same type of brackets.2. Open brackets must be closed in the correct order.3. An empty string is considered balanced.

Prev Quest

Fibonacci Checker

Sat Aug 31 2024

Write a function named `isFibonacciNumber` that determines if a given non-negative integer number is a Fibonacci number. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, usually starting with 0 and 1. That is, fib(0) = 0, fib(1) = 1, fib(2) = 1, fib(3) = 2, fib(4) = 3, fib(5) = 5, fib(6) = 8, and so on.Your function should take one integer parameter and return a boolean value indicating whether the number is part of the Fibonacci sequence.

Next Quest