Showing 3 questions
Determine if a given positive integer is an ugly number. Ugly numbers are defined as positive numbers whose prime factors are limited to 2, 3, and 5.
#1. Ugly Number
You are given a set of numbers that originally contained all numbers from 1 to n. However, due to an error, one number is duplicated and another is missing. Find both the duplicated and missing numbers.
#2. Set Mismatch
You're at a starting cell and want to reach a target cell in a given amount of time. Can you reach the destination in the allotted time, considering you can move in any of the eight directions?
#3. Determine if a Cell Is Reachable at a Given Time