Showing 3 of 53 questions
Rearrange the characters in a given string such that no two adjacent characters are the same. If such an arrangement is possible, return it; otherwise, return an empty string.
#1. Reorganize String
You're given a list of tasks to run, each requiring one unit of time to complete. Determine the shortest time needed to execute all tasks, considering a cooling period after each task execution.
#2. Task Scheduler
Design a hit counter that records hits and retrieves the number of hits in the past 5 minutes. You need to implement methods to record a hit and get the total hits in a sliding window.
#3. Design Hit Counter
Page 1 of 1 · 53 total