Conflict seating tables
An event planner seats a guest list at identical tables. guest_names lists everyone, and conflicts holds pairs written as "ana|bo", meaning those two must never share a table. A table holds at most table_seats guests and the hall supplies as many tables as the planner asks for. Return the smallest number of tables that seats everyone while keeping every conflicting pair apart. A pair may be listed more than once and may appear in either order, and both names always come from guest_names. table_seats is at least 1, so seating each guest alone always works and gives an upper bound. An empty guest list needs no tables, so return 0. There are at most 8 guests.
fewest_banquet_tables(guest_names: list[str], conflicts: list[str], table_seats: int) → int[["ana","bo","cy","dee"],["ana|bo","cy|dee"],2]out2[["ana","bo","cy"],["ana|bo","bo|cy","ana|cy"],4]out3[["ana","bo","cy","dee"],[],1]out4State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
[["ana","bo","cy","dee"],["ana|bo","cy|dee"],2]2not run yetsample[["ana","bo","cy"],["ana|bo","bo|cy","ana|cy"],4]3not run yetsample[["ana","bo","cy","dee"],[],1]4not run yetsample