-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
45 lines (35 loc) · 2.26 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Grand Circus Alumni Code Challenge #2</title>
<link href="index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Sloth's Challenge!</h1>
<p class="justify">
It’s time to board The Badger and cruise across Lake Michigan! The Badger uses assigned seating on the top deck, where seats are in three columns separated by aisles. Several tickets have already been purchased. Our goal is to find all of the possible contiguous seating locations for a family of three. The seats cannot be separated by an aisle. Also, multiple permutations of seating arrangements within a column (or “cluster”) of seats does not constitute multiple valid locations: if four contiguous seats are available, this only constitutes one valid seating location.
</p>
<p class="justify">
The challenge: write a function in a language of your choosing. This function will take in two arguments: 1) an array of purchased seats in no particular order with the syntax of [row][seat], and 2) the number of rows. The seats in each row are arranged thusly: a cluster of three (A, B, and C), a cluster of four (D, E, F, and G), and a cluster of three (H, J, and K). Please note the lack of a seat I (as in India). The function should return the valid number of seating locations for the family of three.
</p>
<!-- Removing sample schematic...
<img src="http://slothwerks.com/dev/grand-circus/alumni-meetup/code-challenge-example-03-2018.jpg" alt="Visual example of Code Challenge #2" class="sample" />
-->
<div id="schematic"></div>
<p id="reserved-seats" class="center"></p>
<p id="resultText" class="center"></p>
<p id="prompt" class="center">
Okay then. Let's take in the number of rows and do some magic.
</p>
<form id="userForm" onsubmit="getResults()">
<div class="enterData">
Enter number of rows: <input onclick="clearWarning()" id="numberOfRows" type="number" max="30" />
</div>
<p id="formWarning"></p>
<input id="formSubmit" type="submit" value="Let's Do This!" />
</form>
<script src="index.js"></script>
</body>
</html>