20%off off — LaunchSpecial
Exercises/#129 Task Scheduler
#129

Task Scheduler

Medium🔢 Math & Numbers
90 XP

Problem

Given a list of tasks and a cooldown n, find the minimum number of intervals needed to finish all tasks.

Examples

Input: tasks = ['A','A','A','B','B','B'], n = 2
Output: 8

Input: tasks = ['A','A','A','B','B','B'], n = 0
Output: 6
mathgreedyhash-map
AI Assistant— powered by AI

Unlock hints progressively — start gentle, go deeper only if needed.

💡

Level 1: Gentle Nudge

A subtle direction

🗺️

Level 2: Approach

The algorithm to use

🔍

Level 3: Detailed

Step-by-step guidance

129 / 150

Your Solution

⚡ JavaScript

to save progress and use AI features