All Posts

Pascal's Triangle Problem

LeetCode 118. Given an integer numRows, return the first numRows...

Pascal's Triangle II Problem

LeetCode 119. Given an integer rowIndex, return the rowIndex^th (0-indexed)...

Minimum Depth Of Binary Tree Problem

LeetCode 111. Given a binary tree, find its minimum depth....

Longest Consecutive Sequence Problem

LeetCode 128. Given an unsorted array of integers nums, return...

Flatten Binary Tree To Linked List Problem

LeetCode 114. Given the root of a binary tree, flatten...

Distinct Subsequences Problem

LeetCode 115. Given two strings s and t, return the...


Best Time To Buy And Sell Stock Problem

LeetCode 121. You are given an array prices where prices[i]...

Best Time To Buy And Sell Stock Iii Problem

LeetCode 123. You are given an array prices where prices[i]...

Best Time To Buy And Sell Stock Ii Problem

LeetCode 122. You are given an integer array prices where...

Balanced Binary Tree Problem

LeetCode 110. Given a binary tree, determine if it is...

Symmetric Tree Problem

LeetCode 101. Given the root of a binary tree, check...

Maximum Depth of Binary Tree Problem

LeetCode 104. Given the root of a binary tree, return...

Convert Sorted Array to Binary Search Tree Problem

LeetCode 108. Given an integer array nums where the elements...


Construct Binary Tree from Preorder and Inorder Traversal Problem

LeetCode 105. Given two integer arrays preorder and inorder where...