Showing 4 questions
Determine if a string containing parentheses is valid. A valid string has matching and properly nested opening and closing parentheses.
#1. Valid Parentheses
Given a grid representing land and water, count the number of distinct islands. An island is formed by connected land cells.
#2. Number of Islands
Given a sorted array, find the first and last position of a given target value. If the target is not found, return [-1, -1].
#3. Find First and Last Position of Element in Sorted Array
You are given a square matrix representing an image. Rotate the image by 90 degrees clockwise in-place.
#4. Rotate Image