2262 Solving Questions With Brainpower
Solving Questions With Brainpower You are given a 0-indexed 2D integer array questions where questions[i] = [pointsi, brainpoweri]. The array describes the questions of an exam, where you have t...
Solving Questions With Brainpower You are given a 0-indexed 2D integer array questions where questions[i] = [pointsi, brainpoweri]. The array describes the questions of an exam, where you have t...
Put Marbles in Bags You have k bags. You are given a 0-indexed integer array weights where weights[i] is the weight of the ith marble. You are also given the integer k. Divide the marbles into t...
Partition Labels You are given a string s. We want to partition the string into as many parts as possible so that each letter appears in at most one part. For example, the string “ababcc” can be ...
Apply Operations to Maximize Score You are given an array nums of n positive integers and an integer k. Initially, you start with a score of 1. You have to maximize your score by applying the fo...
Maximum Number of Points From Grid Queries You are given an m x n integer matrix grid and an array queries of size k. Find an array answer of size k such that for each integer queries[i] you sta...
Minimum Index of a Valid Split An element x of an integer array arr of length m is dominant if more than half the elements of arr have a value of x. You are given a 0-indexed integer array nums ...
Minimum Operations to Make a Uni-Value Grid You are given a 2D integer grid of size m x n and an integer x. In one operation, you can add x to or subtract x from any element in the grid. A uni-v...
Check if Grid can be Cut into Sections You are given an integer n representing the dimensions of an n x n grid, with the origin at the bottom-left corner of the grid. You are also given a 2D arra...
Count Days Without Meetings You are given a positive integer days representing the total number of days an employee is available for work (starting from day 1). You are also given a 2D array meet...
Number of Ways to Arrive at Destination You are in a city that consists of n intersections numbered from 0 to n - 1 with bi-directional roads between some intersections. The inputs are generated ...