Skip to content

Instantly share code, notes, and snippets.

@aaustin
Last active August 29, 2015 14:06
Show Gist options
  • Save aaustin/224e8d4748cda729175c to your computer and use it in GitHub Desktop.
Save aaustin/224e8d4748cda729175c to your computer and use it in GitHub Desktop.

BRANCH ANDROID MOBILE CHALLENGE

Thanks for your interest in Branch!

Specs

The challenge is to build a crash-resistent, and globally accessible queue (+ extra) for our Android SDK. Using Java, build a queue that holds String objects

Some specs:

  1. The same instance of the queue should be accessible anywhere in the app without passing it as a parameter. For example, the state of the queue to persist throughout the entire life cycle of the application, and be accessible from any Activity. That means, in Activity 1, a user could insert a String object into the queue. Then in Activity 2, the user could consume that same String object.
  2. It must be crash/close resistant, and recover queue state in the event of an app crash or app close. That means that any String in the queue would still be there on app restart (post crash).
  3. Stores String objects
  4. Support the functions
  • enqueue
  • dequeue
  • peek
  • peek at
  • insert at
  • remove at
  • get size

Format of submission

Send [email protected] the .java files for your class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment