Have the SeatingStudents(arr) function read the integer array stored in arr which will have the following format: [K, r1, r2, r3, ...] where K represents the number of desks in a classroom and the rest of the integers in the array will be ordered and will represent the desktops that are already occupied. All desks will be arranged in 2 columns, where desk #1 is top left, desk #2 is top right, desk #3 is below desk #1, desk #4 is below #2, etc. Your program should return the number of ways 2 students can sit next to each other. This means that 1 student is to the left and 1 student to the right, or 1 student is directly above or below the other student.
-
Notifications
You must be signed in to change notification settings - Fork 0
DinorahSkidelsky/SeatingStudents
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published