LeetCode

404. Sum Of Left Leaves | LeetCode | Python | Solution

This problem description is pretty simple. The description is: find the sum of all left leaves in a given binary tree. Here is the link of the problem. Let’s see the tree from the example. We see a binary tree in the above example. In a binary tree, each node has at most two child […]

1480. Running Sum of 1d Array | LeetCode | Python | Solution

Problem link Given an array of integers, We have to return the running sum of that array. Suppose, we have an array of integers like [1, 2, 3]. As per the problem, the result of this array will be [1, 3, 6]. We define a running sum of an array as arr[i] = sum(arr[0]…arr[i]). In

1295. Find Numbers with Even Number of Digits | LeetCode | Python | Solution

Here is the problem link to see the problem details. The problem description is very concise and easy to understand. Given an array of integers, we have to return how many of them contain an even number of digits. Example of an even number of digits:1234 = even (here are four digits and four is

876. Middle of the Linked List | LeetCode | Python | Solution

Here is the problem link. See the problem explanation first and try to understand the problem. It’s an easy linked list problem. We have to return the middle node from a linked list. We don’t have to check the emptiness of the given linked list. We will receive only a non-empty linked list. If there

595. Big Countries | Database | LeetCode | Solution

This problem is not about programming related. It’s about the database. Here is the link to the problem. There is a table called the world. It contains some information about countries around the world. These are name, continent, area, population, etc. To solve this problem, we have to write a SQL solution to output big

709. To Lower Case | LeetCode | Solution | Python

Here is the link to the problem. An easy problem to solve. The problem description is easy. Given a string and we have to returns it in lowercase. We can solve this problem in many ways. The first one is we will check each character. If it is uppercase we will change it to lowercase.

237. Delete Node in a Linked List | LeetCode | Solution | Python

This one is a basic linked list problem. Here is the problem link. See the detailed explanation there. This problem is very simple and straightforward. We have to delete the given node. We don’t need to check anything and don’t need to return anything. See the note in the below of the problem explanation. Suppose

155. Min Stack | LeetCode | Solution

This problem is all about designing a stack data structure. Here is the problem link. See the detailed explanation there. To solve this problem, we have to write the most common stack operations. A stack is an abstract data structure. It’s Follow the LIFO (Last In First Out) rules. I hope you already know about

412. Fizz Buzz | LeetCode | Solution

It’s a classic programming problem and a very beginner type of problem. Here is the link to the problem. See the explanation in LeetCode first. And try to understand the problem. First, we will be given a number n as input. We have to store each number from 1 to n in an array as

58. Length of Last Word | LeetCode | Solution

Here is the link to the problem. See the full explanation on LeetCode first. Try to understand the problem. It’s an easy problem. So the problem is, we have to return the length of the last word from the given string. The string can be consist of uppercase and lowercase letters and separated by a

Scroll to Top