# Medium

## Min Stack LeetCode Solution

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.

## Find First and Last Position of Element in Sorted Array LeetCode Solution

Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1].

## Pow(x n) LeetCode Solution

Implement pow(x, n), which calculates x raised to the power n.

## Group Anagrams LeetCode Solution

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

## Rotate Image LeetCode Solution

You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).

## Permutations II LeetCode Solution

Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.

## Jump Game II LeetCode Solution

You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums. Each element nums[i] represents the maximum length of a forward jump from index i. In other words, if you are at nums[i], you can jump to any nums[i + j] where: 0 <= j <= nums[i] and i + j < n. Return the minimum number of jumps to reach nums[n - 1].

## Multiply Strings LeetCode Solution

Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.

## Combination Sum II LeetCode Solution

Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target.

## Combination Sum LeetCode Solution

Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target. You may return the combinations in any order.

## Permutations LeetCode Solution

Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.

## Search in Rotated Sorted Array LeetCode Solution

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.

## Next Permutation LeetCode Solution

Given an array of integers nums, find the next permutation of nums.

## Divide Two Integers LeetCode Solution

Given two integers dividend and divisor, divide two integers without using multiplication, division, and mod operator. Return the quotient after dividing dividend by divisor.

## Find the Index of the First Occurrence in a String LeetCode Solution

Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.

Scroll to Top