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

Image Smoother - Array - Easy - LeetCode
Featured

Image Smoother - Array - Easy - LeetCode

Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the average gray scale (rounding down) of all the 8 surro

1 min read26 Sept 2020
Read article
Maximum Product of Three Numbers - Array - Easy - LeetCode

Maximum Product of Three Numbers - Array - Easy - LeetCode

Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Input: [1

1 min26 Sept
Can Place Flowers - Array - Easy - LeetCode

Can Place Flowers - Array - Easy - LeetCode

Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be pl

1 min26 Sept
Can Make Arithmetic Progression From Sequence - Array - Easy - LeetCode

Can Make Arithmetic Progression From Sequence - Array - Easy - LeetCode

Given an array of numbers arr. A sequence of numbers is called an arithmetic progression if the difference between any t

1 min26 Sept
Average Salary Excluding the Minimum and Maximum Salary - Array - Easy - LeetCode

Average Salary Excluding the Minimum and Maximum Salary - Array - Easy - LeetCode

Given an array of unique integers salary where salary[i] is the salary of the employee i. Return the average salary of e

1 min26 Sept
Shortest Unsorted Continuous Subarray - Array - Easy - LeetCode

Shortest Unsorted Continuous Subarray - Array - Easy - LeetCode

Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order,

1 min26 Sept
Reshape the Matrix - Array - Easy - LeetCode

Reshape the Matrix - Array - Easy - LeetCode

In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with a different

1 min26 Sept
Array Partition I - Array - Easy - LeetCode

Array Partition I - Array - Easy - LeetCode

Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ...

1 min26 Sept
Sewage Workers Find A Giant Rat Inside Mexico City’s Sewer System

Sewage Workers Find A Giant Rat Inside Mexico City’s Sewer System

Mexico City cleanup crews discovered a monster rat while dredging the sewers. It was part of 22 tons of litter the worke

1 min26 Sept
K-diff Pairs in an Array - Array - Easy - LeetCode

K-diff Pairs in an Array - Array - Easy - LeetCode

Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-d

1 min26 Sept
Fibonacci Number - Array - Easy - LeetCode

Fibonacci Number - Array - Easy - LeetCode

The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is th

1 min26 Sept
Max Consecutive Ones - Array - Easy - LeetCode

Max Consecutive Ones - Array - Easy - LeetCode

Given a binary array, find the maximum number of consecutive 1s in this array. Example 1:Input: [1,1,0,1,1,1]Output: 3Ex

1 min26 Sept
Find All Numbers Disappeared in an Array - Array - Easy - LeetCode

Find All Numbers Disappeared in an Array - Array - Easy - LeetCode

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear on

1 min26 Sept
Third Maximum Number - Array - Easy - LeetCode

Third Maximum Number - Array - Easy - LeetCode

Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the max

1 min25 Sept
Move Zeroes - Array - Easy - LeetCode

Move Zeroes - Array - Easy - LeetCode

Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-z

1 min25 Sept
Blog — Page 22 | AskGif