can anyone help with this?
----------------------------------------------------------------------------------------------------------------------------------------
Today the Aristocracy is organizing a feast. We know the number of guests; your task is to seat everyone at the table.
However, some of the guests have given you a list of enemies with which they won’t sit.
The chairs are arranged so that the table has two edge seats with only one neighboring guest. In the other cases, there are two neighbors.
Determine if the guests can be seated in a way that makes everyone happy.
Input:
invited_list - the number of guests invited, 0<invited_list<10
dislike_list - string array of enemies, ["1-2,3"] - means that guest 1 won’t sit with guests 2 and 3
Output:
Boolean - is it possible to seat guests in a way that makes everyone happy
Example:
invited_list = 4
dislike_list = ["1-2", "3-4"]
getResult(invited_list, dislike_list) = True // [1, 4, 2, 3]