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
X of a Kind in a Deck of Cards - Array - Easy - LeetCode
In a deck of cards, each card has an integer written on it. Return true if and only if you can choose X >= 2 such that it is possible to split the entire deck into 1 or more groups of cards, where:…
Sort Array By Parity - Array - Easy - LeetCode
Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the…
Monotonic Array - Array - Easy - LeetCode
An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is monotone increasing if f…
Fair Candy Swap - Array - Easy - LeetCode
Alice and Bob have candy bars of different sizes: A[i] is the size of the i-th bar of candy that Alice has, and B[j] is …
Transpose Matrix - Array - Easy - LeetCode
Given a matrix A, return the transpose of A. The transpose of a matrix is the matrix flipped over it's main diagonal, sw…
Flipping an Image - Array - Easy - LeetCode
Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. To flip…
Positions of Large Groups - Array - Easy - LeetCode
In a string s of lowercase letters, these letters form consecutive groups of the same character. For example, a string l…
Toeplitz Matrix - Array - Easy - LeetCode
A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given an M x N matrix, re…
Largest Number At Least Twice of Others
In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the arra…
Min Cost Climbing Stairs - Array - Easy - LeetCode
On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can ei…
Find Pivot Index - Array - Easy - LeetCode
Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index …
1-bit and 2-bit Characters - Array - Easy - LeetCode
We have two special characters. The first character can be represented by one bit 0. The second character can be represe…
Longest Continuous Increasing Subsequence - Array - Easy - LeetCode
Given an unsorted array of integers, find the length of the longest continuous increasing subsequence (subarray). Exampl…
Maximum Average Subarray I - Array - Easy - LeetCode
Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average val…
Non-decreasing Array - Array - Easy - LeetCode
Given an array nums with n integers, your task is to check if it could become non-decreasing by modifying at most 1 elem…