1475. Final Prices With a Special Discount in a Shop
You are given an integer array prices where prices[i] is the price of the ith item in a shop. There is a special discount for items […]
You are given an integer array prices where prices[i] is the price of the ith item in a shop. There is a special discount for items […]
You are given a string s and an integer repeatLimit. Construct a new string repeatLimitedString using the characters of s such that no letter appears more than repeatLimit times in a
Given two sorted arrays a[] and b[] and an element k, the task is to find the element that would be at the kth position of the
There is a school that has classes of students and each class will be having a final exam. You are
You are given a 0-indexed integer array nums. A subarray of nums is called continuous if: Let i, i + 1, …, jbe the indices in the subarray. Then, for
You are given a 0-indexed array nums and a non-negative integer k. In one operation, you can do the following: Choose an index i that hasn’t been chosen before from the
You are given a string s that consists of lowercase English letters. A string is called special if it is made up of only
An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You are given an
You are given a 0-indexed 2D integer array of events where events[i] = [startTimei, endTimei, valuei]. The ith event starts at startTimeiand ends at endTimei, and if you attend
You are given an integer array nums where the ith bag contains nums[i] balls. You are also given an integer maxOperations. You can perform the following operation
You are given an integer array banned and two integers n and maxSum. You are choosing some number of integers following the below rules: The
You are given two strings start and target, both of length n. Each string consists only of the characters ‘L’, ‘R’, and ‘_’ where: The characters ‘L’ and ‘R’ represent pieces, where a piece ‘L’ can