All Posts

Binary Search Tree Iterator Problem

LeetCode 173. Implement the BSTIterator class that represents an iterator...

Best Time To Buy And Sell Stock IV Problem

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

Word Break Problem

LeetCode 139. Given a string s and a dictionary of...

Word Break II Problem

LeetCode 140. Given a string s and a dictionary of...

Sort List Problem

LeetCode 148. Given the head of a linked list, return...

Single Number Problem

LeetCode 136. Given a non-empty array of integers nums, every...


Single Number II Problem

LeetCode 137. Given an integer array nums whereevery element appears...

Reorder List Problem

LeetCode 143. You are given the head of a singly...

Palindrome Partitioning Problem

LeetCode 131. Given a string s, partition s such that...

Palindrome Partitioning II Problem

LeetCode 132. Given a string s, partition s such that...

Max Points On A Line Problem

LeetCode 149. Given an array of points where points[i] =...

Lru Cache Problem

LeetCode 146. Design a data structure that follows the constraints...

Linked List Cycle Problem

LeetCode 141. Given head, the head of a linked list,...

Linked List Cycle II Problem

LeetCode 142. Given the head of a linked list, return...


Insertion Sort List Problem

LeetCode 147. Given the head of a singly linked list,...

Gas Station Problem

LeetCode 134. There are n gas stations along a circular...