Trapping Rain Water
Problem Statement 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 raining. Solve Here: Trapping Rain Water ...
Problem Statement 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 raining. Solve Here: Trapping Rain Water ...
Problem Statement You are given an integer array height of length n, where each value represents the height of a vertical line drawn at that index. The task is to find two lines that, together wit...
Problem Statement Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that: i != j, i != k, and j != k nums[i] + nums[j] + nums[k] == 0 The solution set mu...
Problem Statement Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numb...
Problem Statement A string is considered a palindrome if, after converting all uppercase letters to lowercase and removing all non-alphanumeric characters, it reads the same forward and backward. ...
Problem Statement Design an algorithm to encode a list of strings to a single string. The encoded string should be able to be decoded back into the original list of strings. You need to: Imple...
Problem Statement Determine if a 9 x 9 Sudoku board is valid. The board is considered valid if: Each row contains the digits 1-9 without repetition. Each column contains the digits 1-9 withou...
Problem Statement Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. The algorithm should run in O(n) time complexity. Solve Here: Longest ...
Problem Statement Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. Solve Here: Product of Array Except S...
Problem Statement Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Solve Here: Top K Frequent Elements Examples: ...