| Name | Register # | Usage | Preserved on call |
|---|---|---|---|
| $zero | 0 | The constant value 0 | NA |
| $v0 - $v1 | 2 - 3 | Values for results and expression evaluation | F |
| $a0 - $a3 | 4 - 7 | Arguments | F |
| $t0 - $t7 | 8 - 15 | Temporaries | F |
| $s0 - $s7 | 16 - 23 | Saved | T |
| $t8 - $t9 | 24 - 25 | More temporaries | F |
| $gp | 28 | Global pointer | T |
| $sp | 29 | Stack pointer | T |
Given that a Boggle board's dimensions are N x N, and dice selection is dependent on relative die adjacencies, it seemed practical to construct an undirected graph to represent the board dynamics. I used an adjacency matrix to represent die positions, which was used to construct an adjacency list.
After constructing the adjacency list, testing adjacencies was convenient and predictable.
Implementing the behavior to unselect the most recently selected die seemed to reflect the behavior of a stack, which is what I used to manage the state of die selection.
The remainder of my time was spent mapping the state of the two data structures to the UI, in addition to styling the UI as closely to the spec as possible.
Things I didn't get to, but would want to expand on: caching (convenient for offline), word validation against an English dictionary, and animations that simulate the physical shaking of a Boggle board.
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <title>Algolia - Multi-category Autocomplete</title> | |
| <style type="text/css"> | |
| .twitter-typeahead { width: 100%; } | |
| .twitter-typeahead .tt-input, .twitter-typeahead .tt-hint { width: 100%; margin: 0px; padding: 8px 12px; border: 2px solid #ccc; outline: none; } | |
| .twitter-typeahead .tt-input:focus { border: 2px solid #0097cf; } |
| 'use strict'; | |
| var React = require('react-native'); | |
| var { | |
| AppRegistry, | |
| StyleSheet, | |
| LinkingIOS, | |
| Text, | |
| View, | |
| } = React; |
| const express = require('express'); | |
| const path = require('path'); | |
| // initialize app | |
| const app = express(); | |
| const port = 3000; | |
| // assuming ~/public/index.html | |
| app.get('/html', (req, res) => { | |
| res.sendFile(path.join(__dirname, 'public', 'index.html')); |
Below are 3 code exercises that will allow us to get a sense for your coding chops and give you exposure to the type of work you'd be doing on a regular basis to ensure you enjoy it. This is isn’t your standard front-end dev gig, as you’ll be writing code that is inserted into websites via 3rd party testing tools like Optimizely and Dynamic Yield. The below exercises are designed to reflect that.
- Create a new gist containing the raw text from the below exercises
- Name your gist
"yourName-surefoot-application.md" - Add your code (in your new file) where indicated
- When complete, revisit the job requirements at the bottom of the description to ensure you're sending a complete application and
