Software Development and Programming Careers (Official Discussion Thread)

Secure Da Bag

Veteran
Joined
Dec 20, 2017
Messages
40,079
Reputation
20,339
Daps
126,272
Ubuntu isn't "Black." It's made in London.

I know. I was making a play on words.

Ubuntu (Zulu pronunciation: [ùɓúntʼù])[1] is a Nguni Bantu term meaning "humanity." It is often translated as "I am because we are," or "humanity towards others," but is often used in a more philosophical sense to mean "the belief in a universal bond of sharing that connects all humanity."[2]

In Southern Africa, it has come to be used as a contested[3] term for a kind of humanist philosophy, ethic, or ideology, also known as Ubuntuism propagated in the Africanisation (transition to majority rule) process of these countries during the 1980s and 1990s.
 
Joined
Jan 21, 2013
Messages
3,416
Reputation
514
Daps
7,621
Reppin
NULL
Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.Tasks could be done without original order. Each task could be done in one interval. For each interval, CPU could finish one task or just be idle.

However, there is a non-negative cooling interval n that means between two same tasks, there must be at least n intervals that CPU are doing different tasks or just be idle.

You need to return the least number of intervals the CPU will take to finish all the given tasks.

Input: tasks = ["A","A","A","B","B","B"], n = 2
Output: 8
Explanation: A -> B -> idle -> A -> B -> idle -> A -> B.


?????????????????????????????
 
Top