# Question

There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the `next` pointer. Internally, `pos` is used to…

# Question

Example 1:

`Input: s = "A man, a plan, a canal: Panama"Output: trueExplanation: "amanaplanacanalpanama" is a palindrome.`

Example 2:

`Input: s = "race a car"Output: falseExplanation: "raceacar" is not a palindrome…`

# Question

You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock.

Return the maximum profit…

# Question

In Pascal’s triangle, each number is the sum of the two numbers directly above it as shown:

Example 1:

`Input: rowIndex = 3Output: [1,3,3,1]`

Example 2:

`Input: rowIndex = 0Output: `

Example 3:

`Input: rowIndex…`

# Question

In Pascal’s triangle, each number is the sum of the two numbers directly above it as shown:

Example 1:

`Input: numRows = 5Output: [,[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]`

Example 2:

`Input: numRows = 1Output: []`

# LeetCode Algorithm Challenges: Single Number

Question: Given a non-empty array of integers `nums`, every element appears twice except for one. Find that single one.

You must implement a solution with a linear runtime complexity and use only constant extra space.

Example 1:

`Input: nums = [2,2,1]Output: 1`

Example 2:

`Input: nums = [4,1,2,1,2]Output…`

# Question

A height-balanced binary tree is a binary tree in which the depth of the two subtrees of every node never differs by more than one.

Example 1:

`Input: nums…`

# Question

For this problem, a height-balanced binary tree is defined as:

a binary tree in which the left and right subtrees of every node differ in height by no more than 1.

Example 1:

`Input: root = [3,9,20,null,null,15,7]Output: true`

Example 2:

# Question

A leaf is a node with no children.

Example 1:

`Input: root = [5,4,8,11,null,13,4,7,2,null,null,null,1], targetSum = 22Output…`

# LeetCode Algorithm Challenges: Minimum & Maximum Depth of Binary Tree

Today I’ll cover 2 questions because they look pretty similar to me even though looking for opposite results. But the solution will have something in common.

# Question 1

A binary tree’s maximum depth is the number of nodes along the longest… ## Nick Solonyy

Full-stack software engineer with an international MBA. Project Management and Team Collaboration experience. React | Javascript | Redux | Rails