there are 3 types of solution for dining philosopher problem
1) using semaphores
2) form two groups as alternative persons are in one group (i.e., 1-3-5-... in one group, 2-4-6-... in another group.)
one group has first pick Left fork then Right fork
another group should has to first pick Right fork then Left fork
3) philosophers are numbered as 0 to n-1, as similar to second one, where 0,....n-2 philosophers in one group, n-1$^{th}$ as one group.
that single person has to first pick Right fork then Left fork, remaining are first pick Left fork then Right fork.