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
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…
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…
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…
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…
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…
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,…
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 …
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), ...…
सीवेज श्रमिक मेक्सिको सिटी के सीवर सिस्टम के अंदर एक विशालकाय चूहा पाते हैं
Mexico City cleanup crews discovered a monster rat while dredging the sewers. It was part of 22 tons of litter the worke…
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…
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…
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…
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…
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…
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…