Click here to see the problem details. Problem Overview We will be given a string (s) and a substring (part). We have to remove all occurrences from the string based on the given substring. We will continue to remove until all the occurrences of the substring are removed. Each time we have to remove the […]

# Tag: Solution

## Truncate Sentence | LeetCode 1816 | Python | Solution

Here is the problem link. Problem Overview This is an easy problem, and it’s basically a string-related problem. I hope you already read the problem description from the given link. So we will be given a string and an integer. The given string is basically a sentence which is a list of words separated by […]

## Shuffle String | LeetCode 1528 | Python | Solution

Click here to see the problem details. Problem Overview This problem is quite simple. We will be given a string (s) and an array (indices) that is the same length as the string. All of the integers of the array are unique, and of course, all the integers will be less or equal to the […]

## Merge Two Sorted Lists | LeetCode 21 | Python | Solution

Click here to see the problem details. Problem Overview The problem description is pretty straightforward. We are given two sorted Linked List. And we have to merge those given Lists into one sorted list. That’s the problem. Suppose our given two lists are 1 -> 3 and 2 -> 4. And the result will be […]

## Duplicate Emails | LeetCode 182 | SQL | Solution

This one is a simple SQL problem. Here is the link to this problem. This one is an absolute beginner type problem. We have to query all the duplicates emails from the given table. The name of the table is Person. The code is almost self-explanatory. All SQL keywords are written in uppercase letters. It’s […]

## 1342. Number of Steps to Reduce a Number to Zero | LeetCode | Python | Solution

Here is the link to this problem. Read the problem description carefully before solving this problem. It’s an easy Leetcode problem. Here we will be given a non-negative number. We have to reduce the number based on some requirements until it gets zero. And then have to return how many steps it takes. To reduce […]

## 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 […]

## 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 […]

## 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 […]