1,724 articles across 10 categories

Stories, Tutorials & Life Tips

Deep dives on coding, health, recipes, travel and everything in between.

πŸ“ Explore Reading Paths

Follow curated journeys from beginner to expert

Count Negative Numbers in a Sorted Matrix - Array - Easy - LeetCode
Featured

Count Negative Numbers in a Sorted Matrix - Array - Easy - LeetCode

Given a m * n matrix grid which is sorted in non-increasing order both row-wise and column-wise.  Return the number of negative numbers in grid.   Example 1: Input: grid = [[4,3,2,-1],[3…

2 min read7 Jun 2020
Read article
How Many Numbers Are Smaller Than the Current Number - Array - Easy - LeetCode

How Many Numbers Are Smaller Than the Current Number - Array - Easy - LeetCode

Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is, for each num…

2 min7 Jun
Lucky Numbers in a Matrix - Array - Easy - LeetCode

Lucky Numbers in a Matrix - Array - Easy - LeetCode

Given a m * n matrix of distinct numbers, return all lucky numbers in the matrix in any order. A lucky number is an ele…

3 min7 Jun
Find the Distance Value Between Two Arrays - Easy - LeetCode

Find the Distance Value Between Two Arrays - Easy - LeetCode

Given two integer arrays arr1 and arr2, and the integer d, return the distance value between the two arrays. The distan…

2 min7 Jun
Shuffle the Array - Easy - LeetCode

Shuffle the Array - Easy - LeetCode

Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn]. Return the array in the form [x…

2 min7 Jun
Create Target Array in the Given Order - Array - Easy - LeetCode

Create Target Array in the Given Order - Array - Easy - LeetCode

Given two arrays of integers nums and index. Your task is to create target array under the following rules: Initially, …

3 min6 Jun
Groups of Special-Equivalent Strings - Easy - LeetCode

Groups of Special-Equivalent Strings - Easy - LeetCode

You are given an array A of strings. A move onto S consists of swapping any two even indexed characters of S, or any tw…

2 min6 Jun
Find Lucky Integer in an Array - Easy - LeetCode

Find Lucky Integer in an Array - Easy - LeetCode

Given an array of integers arr, a lucky integer is an integer which has a frequency in the array equal to its value. Re…

2 min6 Jun
Count Largest Group - Array - Easy - LeetCode

Count Largest Group - Array - Easy - LeetCode

Given an integer n. Each number from 1 to n is grouped according to the sum of its digits.  Return how many groups…

2 min6 Jun
Minimum Value to Get Positive Step by Step Sum - Array - Easy - LeetCode

Minimum Value to Get Positive Step by Step Sum - Array - Easy - LeetCode

Given an array of integers nums, you start with an initial positive value startValue. In each iteration, you calculate …

2 min6 Jun
Kids With the Greatest Number of Candies - Array - Easy - LeetCode

Kids With the Greatest Number of Candies - Array - Easy - LeetCode

Given the array candies and the integer extraCandies, where candies[i] represents the number of candies that the ith kid…

2 min6 Jun
Make Two Arrays Equal by Reversing Sub-arrays - Easy - LeetCode

Make Two Arrays Equal by Reversing Sub-arrays - Easy - LeetCode

Given two integer arrays of equal length target and arr. In one step, you can select any non-empty sub-array of arr and…

3 min5 Jun
Number of Students Doing Homework at a Given Time - Array - Easy - LeetCode

Number of Students Doing Homework at a Given Time - Array - Easy - LeetCode

Given two integer arrays startTime and endTime and given an integer queryTime. The ith student started doing their home…

3 min5 Jun
Maximum Product of Two Elements in an Array - Easy - LeetCode

Maximum Product of Two Elements in an Array - Easy - LeetCode

Given the array of integers nums, you will choose two different indices i and j of that array. Return the maximum value …

1 min5 Jun
Roman to Integer - String - Easy - LeetCode

Roman to Integer - String - Easy - LeetCode

Roman numerals are represented by seven different symbols: I, V, X, L, C, D, and M.   Symbol      …

3 min5 Jun
Blog β€” Page 27 | AskGif