Implement topological sort
Problem There are n nodes and the are labelled from 0 to n - 1. Some nodes may have directed linkage, for example, if links[i] = [ai, bi] this means ai is po...
Problem There are n nodes and the are labelled from 0 to n - 1. Some nodes may have directed linkage, for example, if links[i] = [ai, bi] this means ai is po...
Problem Rotate 2D n by n array to 90 degree clockwise and 90 degree anti-clockwise in-place.
I sometimes fucked up with const in the past. It is better for me to summarize these fucking things.
Clarification Now we want input parameters in packaged_task
Clarification a. We can specify number of threads in the pool b. We can enqueue tasks (For simplicity, task takes no argument and returns an integer) into th...