Showing 10 questions
Determine if you can escape a maze with obstacles, given a starting point and a target. The maze is very large, so a simple search may not be efficient.
#1. Escape a Large Maze
You are given a grid representing land and water. Find the water cell that is furthest from any land cell, and return the distance. If the grid is all land or all water, return -1.
#2. As Far from Land as Possible
You're given a sequence of numbers, each belonging to one of three groups. Find the minimum number of operations to sort the sequence so that all numbers from the same group are clustered together.
#3. Sorting Three Groups
Given a grid representing land and water, count the number of distinct islands. An island is formed by connected land cells.
#4. Number of Islands
Convert a given integer into its Roman numeral representation. You need to understand the mapping between integer values and Roman symbols to perform the conversion accurately.
#5. Integer to Roman
You're given a grid representing land and water. Change one water cell to land to maximize the size of the largest connected land area (island) and return that maximum size.
#6. Making A Large Island
You need to save people using boats, where each boat can carry at most two people with a weight limit. Determine the minimum number of boats required to save everyone.
#7. Boats to Save People
Find the longest palindromic substring within a given string. A palindromic substring reads the same forwards and backward.
#8. Longest Palindromic Substring
Find the length of the longest substring containing the same character you can obtain after performing at most k replacements of characters in the given string. You can only replace characters with other characters.
#9. Longest Repeating Character Replacement
You are given equations of equalities and inequalities involving single variables. Determine if it is possible to assign values to the variables such that all equations are satisfied.
#10. Satisfiability of Equality Equations