1784 Minimum Initial Energy To Finish Tasks
Minimum Initial Energy to Finish Tasks You are given an array tasks where tasks[i] = [actuali, minimumi]: actuali is the actual amount of energy you **spend to finish** the ith task. minimumi is...
Minimum Initial Energy to Finish Tasks You are given an array tasks where tasks[i] = [actuali, minimumi]: actuali is the actual amount of energy you **spend to finish** the ith task. minimumi is...
Separate the Digits in an Array Given an array of positive integers nums, return an array *answer that consists of the digits of each integer in nums after separating them in the same order they ...
Cyclically Rotating a Grid You are given an m x n integer matrix grid, where m and n are both even integers, and an integer k. The matrix is composed of several layers, which is shown in the ...
Minimum Jumps to Reach End via Prime Teleportation You are given an integer array nums of length n. You start at index 0, and your goal is to reach index n - 1. From any index i, you may perfor...
Jump Game IX You are given an integer array nums. From any index i, you can jump to another index j under the following rules: Jump to index j where j > i is allowed only if nums[j] < num...
Rotate List Given the head of a linked list, rotate the list to the right by k places. Example 1: **Input:** head = [1,2,3,4,5], k = 2 **Output:** [4,5,1,2,3] Example 2: **Input:** h...
Rotate Image You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means you have to modify the input 2...
Rotate String Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift on s consists of moving the leftmost character of s to the righ...
Rotated Digits An integer x is a good if after rotating each digit individually by 180 degrees, we get a valid number that is different from x. Each digit must be rotated - we cannot choose to le...
Maximum Path Score in a Grid You are given an m x n grid where each cell contains one of the values 0, 1, or 2. You are also given an integer k. You start from the top-left corner (0, 0) and wan...