---
# System prepended metadata

title: Week2 (Mar 18)

---

# Week2 (Mar 18)

## 264. Ugly Number II

### Question

An ugly number is a positive integer whose prime factors are limited to <mark>$2$</mark>, <mark>$3$</mark>, and <mark>$5$</mark>.

Given an integer <mark>$n$</mark>, return the <mark>$n^{th}$</mark> ugly number.

### Hand in homework before Saturday.

:::success
[Roger的作業](https://github.com/GametreeRoger/LeetCode/blob/main/LeetCode264.playground/Contents.swift)
[Leo的作業](https://github.com/Leownag/leetcode_swfit/blob/master/Pages/264.%20Ugly%20Number%20II.xcplaygroundpage/Contents.swift)
[Wen的作業](https://github.com/Tseng-W/LeetCodePractice/blob/main/LeetCodeStudy.playground/Pages/264.%20Ugly%20Number%20II%20.xcplaygroundpage/Contents.swift)
[xander的作業](https://github.com/Takumi47/30Plus/blob/main/30Plus/Problems/264_UglyNumberII.swift)
[woody的作業](https://github.com/woodycatliu/leetcode/blob/main/0264_UglyNumber2/264.swift)
...`Continue filling by yourself`
:::

## 461. Hamming Distance

### Question

The <mark>Hamming distance</mark> between two integers is the number of positions at which the corresponding bits are different.

Given two integers <mark>$x$</mark> and <mark>$y$</mark>, return the Hamming distance between them.

### Hand in homework before Saturday.

:::success
[Roger的作業](https://github.com/GametreeRoger/LeetCode/blob/main/LeetCode461.playground/Contents.swift)
[Wen的作業](https://github.com/Tseng-W/LeetCodePractice/blob/main/LeetCodeStudy.playground/Pages/461.%20Hamming%20Distance%20.xcplaygroundpage/Contents.swift)
[xander的作業](https://github.com/Takumi47/30Plus/blob/main/30Plus/Problems/461_HammingDistance.swift)
[woody的作業](https://github.com/woodycatliu/leetcode/blob/main/0461_HammingDistance/461.swift)
...`Continue filling by yourself`
:::

## 66. Plus One

### Question

You are given a large integer represented as an integer array <mark>$digits$</mark>, where each <mark>$digits[i]$</mark> is the <mark>$i^{th}$</mark> 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 <mark>$0$'s</mark>.

Increment the large integer by one and return the resulting array of digits.


### Hand in homework before Saturday.

:::success
[Roger的作業](https://github.com/GametreeRoger/LeetCode/blob/main/LeetCode66.playground/Contents.swift)
[Leo的作業](https://github.com/Leownag/leetcode_swfit/blob/master/Pages/66.%20Plus%20One.xcplaygroundpage/Contents.swift)
[Wen的作業](https://github.com/Tseng-W/LeetCodePractice/blob/main/LeetCodeStudy.playground/Pages/66.%20Plus%20One%20.xcplaygroundpage/Contents.swift)
[xander的作業](https://github.com/Takumi47/30Plus/blob/main/30Plus/Problems/66_PlusOne.swift)
[woody的作業](https://github.com/woodycatliu/leetcode/blob/main/0066_PlusOne/66.swift)
...`Continue filling by yourself`
:::

## 463. Island Perimeter

### Question

You are given <mark>row x col</mark> <mark>grid</mark> representing a map where grid[i][j] = 1 represents land and <mark>grid[i][j] = 0</mark> represents water.

Grid cells are connected horizontally/vertically (not diagonally). The <mark>grid</mark> 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.

### Hand in homework before saturday.

:::success
[Roger的作業](https://github.com/GametreeRoger/LeetCode/blob/main/LeetCode463.playground/Contents.swift)
[Leo的作業](https://github.com/Leownag/leetcode_swfit/blob/master/Pages/463.%20Island%20Perimeter.xcplaygroundpage/Contents.swift)
[Wen的作業](https://github.com/Tseng-W/LeetCodePractice/blob/main/LeetCodeStudy.playground/Pages/463.%20Island%20Perimeter%20.xcplaygroundpage/Contents.swift)
[xander的作業](https://github.com/Takumi47/30Plus/blob/main/30Plus/Problems/463_IslandPerimeter.swift)
[woody的作業](https://github.com/woodycatliu/leetcode/blob/main/0463_IslandPerimeter/463.swift)
...`Continue filling by yourself`
:::