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
Maximum Units on a Truck - Array - Easy - LeetCode
You are assigned to put some amount of boxes onto one truck. You are given a 2D array boxTypes, where boxTypes[i] = [numberOfBoxesi, numberOfUnitsPerBoxi]: numberOfBoxesi is the number of boxes of typβ¦
Determine if String Halves Are Alike - String - Easy - LeetCode
You are given a string s of even length. Split this string into two halves of equal lengths, and let a be the first halfβ¦
Number of Students Unable to Eat Lunch - String - Easy - LeetCode
The school cafeteria offers circular and square sandwiches at lunch break, referred to by numbers 0 and 1 respectively. β¦
Reformat Phone Number - String - Easy - LeetCode
You are given a phone number as a string number. number consists of digits, spaces ' ', and/or dashes '-'. You would likβ¦
Count of Matches in Tournament - String - Easy - LeetCode
You are given an integer n, the number of teams in a tournament that has strange rules: If the current number of teams iβ¦
Count the Number of Consistent Strings - String - Easy - LeetCode
You are given a string allowed consisting of distinct characters and an array of strings words. A string is consistent iβ¦
Goal Parser Interpretation - String - Easy - LeetCode
You own a Goal Parser that can interpret a string command. The command consists of an alphabet of "G", "()" and/or "(al)β¦
Richest Customer Wealth - String - Easy - LeetCode
You are given an m x n integer grid accounts where accounts[i][j] is the amount of money the iβββββββββββthββββ customerβ¦
Maximum Repeating Substring - String - Easy - LeetCode
For a string sequence, a string word is k-repeating if word concatenated k times is a substring of sequence. The word's β¦
Check If Two String Arrays are Equivalent - String - Easy - LeetCode
Given two string arrays word1 and word2, return true if the two arrays represent the same string, and false otherwise. Aβ¦
Valid Triangle Number - Array - Medium - LeetCode
Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array thaβ¦
Shortest Unsorted Continuous Subarray - Array - Medium - LeetCode
Given an integer array nums, you need to find one continuous subarray that if you only sort this subarray in ascending oβ¦
Array Nesting - Array - Medium - LeetCode
A zero-indexed array A of length N contains all integers from 0 to N-1. Find and return the longest length of set S, wheβ¦
Subarray Sum Equals K - Array - Medium - LeetCode
Given an array of integers nums and an integer k, return the total number of continuous subarrays whose sum equals to k.β¦
K-diff Pairs in an Array - Array - Medium - LeetCode
Given an array of integers nums and an integer k, return the number of unique k-diff pairs in the array. A k-diff pair iβ¦