Question

Input: head = [3,2,0,-4], pos = 1
Output: true
Explanation: There is a cycle…

Photo by Markus Spiske on Unsplash

Question

Input: s = "A man, a plan, a canal: Panama"
Output: true
Explanation: "amanaplanacanalpanama" is a palindrome.
Input: s = "race a car"
Output: false
Explanation: "raceacar" is not a palindrome.

What is a palindrome?


LeetCode Algorithm Challenges

How to solve LeetCode Algorithm Challenges?

Question

Input: prices = [7,1,5,3,6,4]
Output: 5
Explanation: Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 6-1 = 5. …


Question

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

That should be easy?


Question

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

What is Pascal’s triangle?


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

Linear runtime complexity


Question

Input: nums = [-10,-3,0,5,9]
Output: [0,-3,9,-10,null,5]
Explanation: [0,-10,5,null,-3,null,9] is also accepted:

Question

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


Question

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


Question 1

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

Solution

Nick Solonyy

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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store