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

Largest Perimeter Triangle - Math - Easy - LeetCode
Featured

Largest Perimeter Triangle - Math - Easy - LeetCode

Given an array A of positive lengths, return the largest perimeter of a triangle with non-zero area, formed from 3 of these lengths. If it is impossible to form any triangle of non-zero area, return 0…

1 min read1 Oct 2020
Read article
DI String Match - Math - Easy - LeetCode

DI String Match - Math - Easy - LeetCode

Given a string S that only contains "I" (increase) or "D" (decrease), let N = S.length. Return any permutation A of [0, …

1 min1 Oct
Smallest Range I - Math - Easy - LeetCode

Smallest Range I - Math - Easy - LeetCode

Given an array A of integers, for each integer A[i] we may choose any x with -K <= x <= K, and add x to A[i]. Afte…

1 min1 Oct
Surface Area of 3D Shapes - Math - Easy - LeetCode

Surface Area of 3D Shapes - Math - Easy - LeetCode

On a N * N grid, we place some 1 * 1 * 1 cubes. Each value v = grid[i][j] represents a tower of v cubes placed on top of…

1 min1 Oct
Projection Area of 3D Shapes - Math - Easy - LeetCode

Projection Area of 3D Shapes - Math - Easy - LeetCode

On a N * N grid, we place some 1 * 1 * 1 cubes that are axis-aligned with the x, y, and z axes. Each value v = grid[i][j…

1 min1 Oct
Binary Gap - Math - Easy - LeetCode

Binary Gap - Math - Easy - LeetCode

Given a positive integer n, find and return the longest distance between any two adjacent 1's in the binary representati…

1 min1 Oct
Rectangle Overlap - Math - Easy - LeetCode

Rectangle Overlap - Math - Easy - LeetCode

A rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) are the coordinates of its bottom-left corner, and…

1 min1 Oct
Largest Triangle Area - Math - Easy - LeetCode

Largest Triangle Area - Math - Easy - LeetCode

You have a list of points in the plane. Return the area of the largest triangle that can be formed by any 3 of the point…

1 min1 Oct
Self Dividing Numbers - Math - Easy - LeetCode

Self Dividing Numbers - Math - Easy - LeetCode

A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing num…

1 min1 Oct
Range Addition II - Math - Easy - LeetCode

Range Addition II - Math - Easy - LeetCode

Given an m * n matrix M initialized with all 0's and several update operations. Operations are represented by a 2D array…

1 min1 Oct
Perfect Number - Math - Easy - LeetCode

Perfect Number - Math - Easy - LeetCode

A perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. A…

1 min1 Oct
Minimum Moves to Equal Array Elements - Math - Easy - LeetCode

Minimum Moves to Equal Array Elements - Math - Easy - LeetCode

Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, w…

1 min1 Oct
Arranging Coins - Math - Easy - LeetCode

Arranging Coins - Math - Easy - LeetCode

You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. …

2 min1 Oct
Valid Perfect Square - Math - Easy - LeetCode

Valid Perfect Square - Math - Easy - LeetCode

Given a positive integer num, write a function that returns True if num is a perfect square else False. Follow up: Do no…

1 min1 Oct
Power of Three - Math - Easy - LeetCode

Power of Three - Math - Easy - LeetCode

Given an integer, write a function to determine if it is a power of three. Example 1: Input: 27Output: trueExample 2: In…

3 min1 Oct
Blog β€” Page 16 | AskGif