## Fractional Knapsack

You are given two lists of integers weights and values which have the same length and an integer capacity. weights[i] and values[i] represent the weight and ...

You are given two lists of integers weights and values which have the same length and an integer capacity. weights[i] and values[i] represent the weight and ...

Find the minimum number of coins required to make n cents.

You are given a lowercase alphabet string s that is a palindrome. Update one character such that s is no longer a palindrome and is lexicographically smallest.

You are given a list of integers nums. Return the maximum possible abs(nums[i] + nums[i + 1] + ... + nums[j]) for any i <= j.

Given a lowercase alphabet string s, return the minimum number of characters that we need to delete such that the frequency of each character occurs a unique...

A distance of a lowercase alphabet character is defined to be its index (1-indexed) in the alphabet. For example "a" is 1, "b" is 2 and "z" is 26. The distan...

You are given a two-dimensional list of integers intervals where each list represents an inclusive [start, end] interval. Return the longest interval that yo...

Given a two-dimensional integer list intervals representing unsorted inclusive intervals, return their union in sorted order.

You are given a two-dimensional list of integers intervals where each list represents an inclusive [start, end] interval.

Given a list of integers nums, return the sum of a non-empty contiguous sublist with the largest sum.

You are given a list of non-negative integers piles where each piles[i] represents the number of coins on pile i. In each move, you can do the following unti...

You are given a list of integers nums. Given that you can first reverse one sublist in nums, return whether you can make the resulting list be arranged in as...

You are given a string s containing "1", "2", "3" and "?". Given that you can replace any “?” with "1", "2" or "3", return the smallest number you can make a...

Given a list of positive integers nums, return the number of integers that have odd number of digits.

Given a list of integers nums, find the largest product of three distinct elements.

You are given a list of non-negative integers nums. If there are exactly k numbers in nums that are greater than or equal to k, return k. Otherwise, return -1.

Given a two-dimensional integer list intervals of the form [start, end] representing intervals (inclusive), return their intersection, that is, the interval ...

You are given a list of integers rooms and an integer target. Return the first integer in rooms that’s target or larger. If there is no solution, return -1.

You are given a list of integers nums. Return the index of every peak in the list, sorted in ascending order. An index i is called a peak if:

You are given two lists of integers a and b where every element in both lists is between 1 to 6. Consider an operation where you pick a number in either a or...

You are given a list of integers nums which contains at least one 1. Return whether all the 1s appear consecutively.

Given a list of integers prices representing prices of cars for sale, and a budget k, return the maximum number of cars you can buy.

You are given a string s containing digits from "0" to "9" and lowercase alphabet characters. Return the sum of the numbers found in s.