Jump to content

eferoghenej

New Members
  • Posts

    3
  • Joined

  • Last visited

eferoghenej's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. it's not homework, it's a test from an interview that i already didn't get past. i would have expected some encouragement and maybe a few pointers. i'm not asking anyone to write the code for me.
  2. I'm totally lost. I don't even know to begin.
  3. 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]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.