Problems
All the problems
-
Leetcode 49 - Group Anagrams
Given an array of strings, group anagrams together. An anagram is a word formed by rearranging the letters of a different word, using all original letters exactly once.
-
Leetcode 242 - Valid Anagram
Given two strings s and t, return true if t is an anagram of s, and false otherwise.
-
Leetcode 322 - Coin Change
Given an array of coin denominations and a total amount, determine the minimum number of coins needed to make up that amount, or return -1 if it's not possible.
-
Leetcode 70 - Climbing Stairs
Determine the number of distinct ways to climb to the top of a staircase with 'n' steps, where each time you can climb 1 or 2 steps.
-
Leetcode 11 - Container With Most Water
Given an array of integers representing the height of vertical lines, find the maximum amount of water a container formed by these lines can store.
-
Leetcode 371 - Sum of Two Integers
Given two integers a and b, return the sum of the two integers without using the operators + and -.
-
Leetcode 15 - 3Sum
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 nums[i] + nums[j] + nums[k] == 0. The solution set must not contain duplicate triplets.
-
Leetcode 153 - Find Minimum in Rotated Sorted Array
Given a sorted rotated array of unique elements, return the minimum element of this array.
-
Leetcode 152 - Maximum Product Subarray
Given an integer array nums, find a subarray that has the largest product, and return the product.
-
Leetcode 217 - Contains Duplicate
Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.
-
Leetcode 53 - Maximum Subarray
Given an integer array nums, find the subarray with the largest sum and return its sum.
-
Leetcode 121 - Best Time to Buy and Sell Stock
You want to maximize your profit by choosing a single day to buy one stock and a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction.
-
Leetcode 238 - Product of Array Except Self
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].
-
Leetcode 567 - Permutation in String
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
-
Leetcode 33 - Search in Rotated Sorted Array
Given the array nums after the possible rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums.