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

Majority Element Leetcode Solution

Problem Statement We are given an array of integers. We need to return the integer which occurs more than ⌊N / 2⌋ time in the array where ⌊ ⌋ is the floor operator. This element is called the majority element. Note that the input array always contains a majority element. …

Read more

Translate »