Is leetcode result validation broken or my solution fails
Hi, my solution is using 5 semaphores to represent 5 folks, and make one philosopher use different folk picking order to the other 4 philosophers.\nMy code can 
Hi, my solution is using 5 semaphores to represent 5 folks, and make one philosopher use different folk picking order to the other 4 philosophers.\nMy code can pass 1 round eating, but fails more then 1 .\n\nI\'ve checked the output of 2 round eating, can\'t see the problem. Here is the output of input 2:\n```\n[[4,2,1],[4,1,1],[2,2,1],[2,1,1],[2,0,3],[2,1,2],[2,2,2],[1,2,1],[1,1,1],[4,0,3],[4,1,2],[4,2,2],[4,2,1],[4,1,1],[1,0,3],[1,1,2],[1,2,2],[2,2,1],[2,1,1],[2,0,3],[2,1,2],[2,2,2],[1,2,1],[1,1,1],[4,0,3],[4,1,2],[4,2,2],[1,0,3],[1,1,2],[1,2,2],[0,1,1],[0,2,1],[3,2,1],[3,1,1],[3,0,3],[3,1,2],[3,2,2],[3,2,1],[3,1,1],[0,0,3],[0,1,2],[0,2,2],[3,0,3],[3,1,2],[3,2,2],[0,1,1],[0,2,1],[0,0,3],[0,1,2],[0,2,2]]\n```\nAnd below is my code:\n```java\nclass DiningPhilosophers {\n  private List<Semaphore> semaphoreList = new ArrayList<>();\n\n  public DiningPhilosophers() {\n    for (int i = 0; i < 5; i++) {\n      semaphoreList.add(new Semaphore(1));\n    }\n  }\n\n  // call the run() method of any runnable to execute its code\n  public void wantsToEat(int philosopher,\n                         Runnable pickLeftFork,\n                         Runnable pickRightFork,\n                         Runnable eat,\n                         Runnable putLeftFork,\n                         Runnable putRightFork) throws InterruptedException {\n\n    int leftForkIndex = (philosopher ) %5;\n    int rightForkIndex = (philosopher + 1) % 5;\n    Semaphore leftForkSemaphore = semaphoreList.get(leftForkIndex);\n    Semaphore rightForkSemaphore = semaphoreList.get(rightForkIndex);\n    if (philosopher == 0) {\n      // pick left fork first\n        leftForkSemaphore.acquire();\n        pickLeftFork.run();\n        rightForkSemaphore.acquire();\n        pickRightFork.run();\n        eat.run();\n        leftForkSemaphore.release();\n        putLeftFork.run();\n        rightForkSemaphore.release();\n        putRightFork.run();\n    } else {\n      // pick right fork first\n      rightForkSemaphore.acquire();\n      pickRightFork.run();\n      leftForkSemaphore.acquire();\n      pickLeftFork.run();\n      eat.run();\n      leftForkSemaphore.release();\n      putLeftFork.run();\n      rightForkSemaphore.release();\n      putRightFork.run();\n    }\n  }\n}\n```
[]