Skip to content

Instantly share code, notes, and snippets.

View SirNeuman's full-sized avatar

Josh Sacks SirNeuman

  • Baltimore, Maryland, US
View GitHub Profile
@SirNeuman
SirNeuman / BastilleAgencyTest.md
Last active February 28, 2017 04:37
Bastille Agency Test

All of the following code is written in Python.

Problem 1:

Data is just a dictionary, where the keys are user tokens. The value for each key is another dictionary, where the keys are the URLs. I could use a set instead of a dictionary for the URLs, but finding a matching value in a dictionary is O(1) as opposed to a set, which is O(n). This also would allow us in the future to add more data to each URL if we wanted to. E.G. data = {'john': {'google.com': {'potential_future_bool': True}, 'cnn.com': {}}, 'aaron': {'reddit.com': {}}}

Keybase proof

I hereby claim:

  • I am sirneuman on github.
  • I am sirneuman (https://keybase.io/sirneuman) on keybase.
  • I have a public key ASCFxQKbTq6ECv1ElPV62_DTINkigNbTXbw7GWKnVdZEfwo

To claim this, I am signing this object: