Research ### [LeetCode 503] Next Greater Element II

Approach Using Stack [Accepted] This approach makes use of a stack. This stack stores the indices of the appropriate elements from array. The top ...

Research ### [LeetCode 2] Add two numbers

Problem Link: https://leetcode.com/problems/add-two-numbers/ Solution: Before explaining the above solution, it should be prefaced that there is an another approach to this problem that ...

Research ### [LeetCode 1] Two Sum

Solution Article Approach 1: Brute Force The brute force approach is simple. Loop through each ...

Algorithms ### [LeetCode 297] Serialize and Deserialize Binary Tree

References: https://leetcode.com/problems/serialize-and-deserialize-binary-tree/ Solution Approach 1: Depth First Search (DFS) Intuition The serialization of a Binary Search Tree is essentially ...

Research ### [LeetCode 146] LRU Cache

Solution Approach 1: Ordered dictionary Intuition We’re asked to implement the structure which provides the following operations ...

Research ### [LeetCode 15] 3Sum

Solution This problem is a follow-up of Two Sum, and it is a good idea ...

Solution Article Approach 1: Brute Force The brute force approach is simple. Loop through each ...