LeetCode 1226. The Dining Philosophers

1
2
3
4
5
6
7
8
class DiningPhilosophers {
private:
    bool arr[5];
    mutex m;
    mutex marr[5];
public:
    DiningPhilosophers() {
        for(int i=0;i[......]<p class="read-more"><a href="https://www.gerrytang.top/?p=868">Read more</a></p>