An ugly number is a positive integer whose prime factors are limited to , , and .
Given an integer , return the ugly number.
The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Given two integers and , return the Hamming distance between them.
You are given a large integer represented as an integer array , where each is the digit of the integer. The digits are ordered from most significant to least significant in left-to-right order. The large integer does not contain any leading 's.
Increment the large integer by one and return the resulting array of digits.
You are given row x col grid representing a map where grid[i][j] = 1 represents land and grid[i][j] = 0 represents water.
Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one island (i.e., one or more connected land cells).
The island doesn't have "lakes", meaning the water inside isn't connected to the water around the island. One cell is a square with side length 1. The grid is rectangular, width and height don't exceed 100. Determine the perimeter of the island.