Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and&nb…
My memo and playground
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and&nb…
You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the i…
Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they a…
Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A&n…
A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it …
Given an array of strings words and a width maxWidth, format the text such that each line has exactly maxWidth characters and…
The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a f…
Given an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words&n…
Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “”. E…
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after …