LeetCode 200 The number of islands is one of the most popular programming problems. Read the problem description first. Before getting into the solution, I assume...

Continue reading...# LeetCode

## Same Tree | LeetCode 100 | Python | Solution

LeetCode 100 It’s an easy LeetCode problem, and the description is concise and straightforward. We can solve this problem using the DFS algorithm. From two binary...

Continue reading...## Kth Smallest Element in a BST | LeetCode 230 | Python | Solution

LeetCode 230 I hope you already know about Binary Search Tree. In BST, each node is greater than its left subtree and smaller than its right...

Continue reading...## Binary Tree Level Order Traversal | LeetCode 102 | Python | Solution

LeetCode 102 This problem just simply the implementation of the level order traversal algorithm. If you don’t know about level order traversal yet, you can check...

Continue reading...## Maximum Depth of Binary Tree | LeetCode 104 | Python | Solution

LeetCode 104 It’s a common and basic type of problem. The problem title is self-explanatory. We all know about a binary tree. To solve this problem,...

Continue reading...## Two Sum | LeetCode 1 | Python | Solution

LeetCode 1 Read the problem description first and think about the problem. We will be given an integer array and target. Target is also an integer....

Continue reading...## Largest Odd Number in String | LeetCode 1903 | Python | Solution

LeetCode 1903 It’s a simple problem. We have to return the largest odd number from the given string. If we check odd numbers from the last,...

Continue reading...## Reverse Linked List | LeetCode 206 | Python | Solution

LeetCode 206 Reverse Linked List is one of the classic programming problems. The problem description is nothing complicated. We have to reverse the given Linked List...

Continue reading...## Palindrome Number | LeetCode 9 | Python | Solution

LeetCode 9 Before getting into the solution, let’s see the definition of a palindrome. According to Wikipedia: A palindrome is a word, number, phrase, or other...

Continue reading...## Ransom Note | LeetCode 383 | Python | Solution

LeetCode 383 Problem Overview Ransom Note is a pretty common programming problem. The problem description is concise and understandable. So, this problem says that we will...

Continue reading...