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

Valid Palindrome II
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: "aba" Output: True Example 2: Input: "abca" Ouβ¦

Repeated String Match
Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If noβ¦

Count Binary Substrings
Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and allβ¦

To Lower Case
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: β¦

Rotated Digits
X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different froβ¦

Unique Morse Code Words
International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follβ¦

Most Common Word
Given a paragraph and a list of banned words, return the most frequent word that is not in the list of banned words.&nbsβ¦

Goat Latin
A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters onlyβ¦

Buddy Strings
Given two strings A and B of lowercase letters, return true if and only if we can swap two letters in A so that the resuβ¦

Reverse Only Letters
Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and alβ¦

Long Pressed Name
Your friend is typing his name into a keyboard. Sometimes, when typing a character c, the key might get long pressβ¦

Unique Email Addresses
Every email consists of a local name and a domain name, separated by the @ sign. For example, in alice@leetcode.com, alβ¦

Reorder Data in Log Files
You have an array of logs. Each log is a space-delimited string of words. For each log, the first word in each loβ¦

Greatest Common Divisor of Strings
For strings S and T, we say "T divides S" if and only if S = T + ... + T (T concatenated with itself 1 or more timβ¦

Defanging an IP Address
Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every perβ¦