Showing 3 of 6 questions
Given a grid representing land and water, count the number of distinct islands. An island is formed by connected land cells.
#1. Number of Islands
Given an array representing the height of bars, calculate how much water can be trapped between them after rain. Think about finding the maximum height to the left and right of each bar.
#2. Trapping Rain Water
Given a sequence of words and a line width, format the text to fit within the specified width. You must justify the text, distributing extra spaces evenly between words.
#3. Text Justification
Page 1 of 1 · 6 total