3980 Best Time To Buy And Sell Stock Using Strategy
Best Time to Buy and Sell Stock using Strategy You are given two integer arrays prices and strategy, where: prices[i] is the price of a given stock on the ith day. strategy[i] represents a tradi...
Best Time to Buy and Sell Stock using Strategy You are given two integer arrays prices and strategy, where: prices[i] is the price of a given stock on the ith day. strategy[i] represents a tradi...
Best Time to Buy and Sell Stock V You are given an integer array prices where prices[i] is the price of a stock in dollars on the ith day, and an integer k. You are allowed to make at most k tra...
Maximum Profit from Trading Stocks with Discounts You are given an integer n, representing the number of employees in a company. Each employee is assigned a unique ID from 1 to n, and employee 1 ...
Number of Ways to Divide a Long Corridor Along a long library corridor, there is a line of seats and decorative plants. You are given a 0-indexed string corridor of length n consisting of letters...
Number of Smooth Descent Periods of a Stock You are given an integer array prices representing the daily price history of a stock, where prices[i] is the stock price on the ith day. A smooth des...
Coupon Code Validator You are given three arrays of length n that describe the properties of n coupons: code, businessLine, and isActive. The ith coupon has: code[i]: a **string** representing t...
Count Mentions Per User You are given an integer numberOfUsers representing the total number of users and an array events of size n x 3. Each events[i] can be either of the following two types: ...
Count Covered Buildings You are given a positive integer n, representing an n x n city. You are also given a 2D grid buildings, where buildings[i] = [x, y] denotes a unique building located at co...
Count the Number of Computer Unlocking Permutations You are given an array complexity of length n. There are n locked computers in a room with labels from 0 to n - 1, each with its own unique pa...
Count Special Triplets You are given an integer array nums. A special triplet is defined as a triplet of indices (i, j, k) such that: 0 <= i < j < k < n, where n = nums.length nums[...