# LeetCode

## 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, we will get the result. If a number is odd, we can say that all the numbers from start to including this number are odd. Suppose the given number […]

## 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 and return the reversed list. For example: We can solve this problem in many ways. Before getting into the solution, you can check my blog about the Linked List

## 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 sequence of characters which reads the same backward as forward So to solve this problem, we have to reverse the given number. After that, we can check both versions

## 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 be given two strings (ransomNote and magazine). In short, we have to return True if all the characters of the ransomNote are in the magazine string. Otherwise, False. For

## Maximum Number of Words Found in Sentences | LeetCode 2114 | LeetCode | Python | Solution

LeetCode 2124 This one is one of the easy problems on LeetCode. To solve this problem, mainly you have to know how to split a sentence based on spaces and count array elements. If you know the basics of Python, this will not be a big deal for you. You can solve this problem. I

## Group Anagrams | LeetCode 49 | Python | Solution

LeetCode 49 If you know how to valid anagram, this one will be easier for you to solve. You can check this to know about it (Valid Anagram). I assume that you already know how to valid anagram. So, to solve this problem, we do the same thing. But this time, we have to group

## Delete the Middle Node of a Linked List | LeetCode 2095 | Python | Solution

LeetCode 2095 Before moving into the problem, we need to know how to delete a node from a linked list. If you don’t know about Linked List, you can read my article about it (Linked List). To delete a node, we need to keep track previous node of it. We will use the formula: previous.next

## Kth Largest Element in an Array | LeetCode 215 | Python | Solution

LeetCode 215 From an integer array, we have to find the kth largest element. I assume that you already know about the sorting algorithms. We all know how to access an element from an array. If we sort it in descending order, the kth position will be k-1. We all know that an array index

## Guess Number Higher or Lower | LeetCode 374 | Python | Solution

Click here to see the problem on LeetCode. This problem is all about Binary Search. If you know about Binary Search Algorithm, you can solve this problem. In binary search, we search for a value from the mid. Generally, we know the searching value before starting the search. And based on that, we can decide

## Valid Anagram | LeetCode 242 | Python | Solution

Click here to see this problem on LeetCode. This problem’s difficulty level is easy. Problem Overview Simple problem. From the given two strings, we have to check the first one is an anagram of the second one. If it’s not true, then we will return False. Otherwise, True. According to Wikipedia: An Anagram is a