1226. The Dining Philosophers (Leetcode 1226)
Five silent philosophers sit at a round table with bowls of spaghetti. Forks are placed between each pair of adjacent philosophers.
Each philosopher must alternately think and eat. However, a philosopher can only eat spaghetti when they have both left and
原创
2019-10-26 17:19:34 ·
618 阅读 ·
0 评论