853 Most Profit Assigning Work
Most Profit Assigning Work You have n jobs and m workers. You are given three arrays: difficulty, profit, and worker where: difficulty[i] and profit[i] are the difficulty and the profit of the i...
Most Profit Assigning Work You have n jobs and m workers. You are given three arrays: difficulty, profit, and worker where: difficulty[i] and profit[i] are the difficulty and the profit of the i...
Sum of Square Numbers Given a non-negative integer c, decide whether there’re two integers a and b such that a2 + b2 = c. Example 1: **Input:** c = 5 **Output:** true **Explanation:** 1 * 1...
Minimum Number of Moves to Seat Everyone There are n seats and n students in a room. You are given an array seats of length n, where seats[i] is the position of the ith seat. You are also given t...
Subarray Sums Divisible by K Given an integer array nums and an integer k, return *the number of non-empty subarrays that have a sum divisible by *k. A subarray is a contiguous part of an array....
Relative Sort Array Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also in arr1. Sort the elements of arr1 such that the relative ordering of ite...
Height Checker A school is trying to take an annual photo of all the students. The students are asked to stand in a single file line in non-decreasing order by height. Let this ordering be repres...
Pow(x, n) Implement pow(x, n), which calculates x raised to the power n (i.e., xn). Example 1: **Input:** x = 2.00000, n = 10 **Output:** 1024.00000 Example 2: **Input:** x = 2.10000, ...
Nim Game You are playing the following Nim Game with your friend: Initially, there is a heap of stones on the table. You and your friend will alternate taking turns, and **you go first**. On eac...
Stone Game VI Alice and Bob take turns playing a game, with Alice starting first. There are n stones in a pile. On each player’s turn, they can remove a stone from the pile and receive points ba...
Minimum Window Substring Given two strings s and t of lengths m and n respectively, return the minimum window substring* of s such that every character in t (including duplicates) is included in ...