Home
Metalog
Cancel

LeetCode 202. Happy Number

202. Happy Number Problem Write an algorithm to determine if a number n is happy. A happy number is a number defined by the following process: Starting with any positive integer, replace the nu...

LeetCode 17. Letter Combinations of Phone Number

17. Letter Combinations of Phone Number Problem Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in ...

LeetCode 118. Pascal's Triangle

118. Pascal’s Triangle Problem Given an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it as shown...

LeetCode 26. Remove Duplicates From Sorted Array

26. Remove Duplicates From Sorted Array Problem Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The rel...

LeetCode 20. Valid Parentheses

20. Valid Parentheses Problem Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets...

LeetCode 14. Longest Common Prefix

14. Longest Common Prefix Problem 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 "". Questions befo...

LeetCode 13. Roman To Integer

13. Roman To Integer Problem Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L ...

LeetCode 937. Reorder Data in Log Files

397. Reorder Data in Log Files Problem You are given an array of logs. Each log is a space-delimited string of words, where the first word is the identifier. There are two types of logs: Letter...

LeetCode 2007. Find Original Array From Doubled Array

2007. Find Original Array From Doubled Array Problem An integer array original is transformed into a doubled array changed by appending twice the value of every element in original, and then rand...

LeetCode 11. Container With Most Water

11. Container With Most Water Problem You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i])...