Given an integer `n`

, return *true** if it is a power of two. Otherwise, return *

.*false*

An integer `n`

is a power of two, if there exists an integer `x`

such that `n == 2x`

.

**Example 1:**

**Input:** n = 1

**Output:** true

**Explanation: **20 = 1

**Example 2:**

**…**

Given the `head`

of a linked list and an integer `val`

, remove all the nodes of the linked list that has `Node.val == val`

, and return *the new head*.

**Example 1:**

**Input:** head = [1,2,6,3,4,5,6], val = 6

**Output:** [1,2,3,4,5]

**Example 2:**

**Input:** head = [], val = 1

**Output…**

Implement pow(x, n), which calculates `x`

raised to the power `n`

(i.e., `xn`

).

**Example 1:**

**Input:** x = 2.00000, n = 10

**Output:** 1024.00000

**Example 2:**

**Input:** x = 2.10000, n = 3

**Output:** 9.26100

**Example 3:**

**Input:** x = 2.00000, n = -2

**Output:** 0.25000

**Explanation:** 2-2 = 1/22 =…

Given an `m x n`

integer matrix `matrix`

, if an element is `0`

, set its entire row and column to `0`

's.

You must do it in place.

**Example 1:**

**Input:** matrix = [[1,1,1],[1,0,1],[1,1,1]]

**Output:** [[1,0,1],[0,0,0],[1,0,1]]

**Example 2:**

Given the `head`

of a singly linked list, reverse the list, and return *the reversed list*.

**Example 1:**

**Input:** head = [1,2,3,4,5]

**Output:** [5,4,3,2,1]

**Example 2:**

Given an integer array nums, return all the triplets `[nums[i], nums[j], nums[k]]`

such that `i != j`

, `i != k`

, and `j != k`

, and `nums[i] + nums[j] + nums[k] == 0`

.

Notice that the solution set must not contain duplicate triplets.

**Example 1:**

**Input:** nums = [-1,0,1,2,-1,-4]

**Output:** [[-1,-1,2],[-1,0,1]]…

Given a 2D `grid`

of size `m x n`

and an integer `k`

. You need to shift the `grid`

`k`

times.

In one shift operation:

- Element at
`grid[i][j]`

moves to`grid[i][j + 1]`

. - Element at
`grid[i][n - 1]`

moves to`grid[i + 1][0]`

. - Element at
`grid[m - 1][n …`