Find Common Characters Leetcode Solution

Problem Statement In this problem, we are given an array of strings. We need to print a list of all characters that appear in every string in the array(duplicates included). That is if a character appears 2 times in every string, but not 3 times, we need to have it …

Read more

Is Subsequence Leetcode Solution

Problem Statement In this problem, we are given two different strings. The goal is to find out whether the first string is a subsequence of the second. Examples first string = “abc” second string = “mnagbcd” true first string = “burger” second string = “dominos” false Approach(Recursive) This is easy …

Read more

Jewels and Stones Leetcode Solution

The problem Jewels and Stones Leetcode Solution states that you are given two strings. One of them represents jewels and one of them represents stones. The string that contains jewels represents the characters that are jewels. We need to find the number of characters in the stones string that are …

Read more

Compare Strings by Frequency of the Smallest Character Leetcode Solution

The problem Compare Strings by Frequency of the Smallest Character Leetcode Solution, states that we define a function f(s) over a non-empty string s such that f(s) is equal to the frequency of the smallest character in the string. Then we are given some words and some queries. for each …

Read more

Student Attendance Record I Leetcode Solution

Problem statement In the problem ” Student Attendance Record I” we are given a string where each letter represents the attendance detail of a student. The interpretation of letters in the string is as follows: ‘A’ means absent. ‘P’ means present. ‘L’ means late The student will be rewarded based …

Read more

Find All Numbers Disappeared in an Array Leetcode Solution

Problem Statement In this problem, we are given an array of integers. It contains elements ranging from 1 to N, where N = size of the array. However, there are some elements that have disappeared and some duplicates are present in their place. Our goal is to return an array …

Read more

Translate »