Optimal Seating Arrangement Algorithm Analysis