data-structures-and-algorithms

401 data structures and algorithms code challenges


Project maintained by alsosteve Hosted on GitHub Pages — Theme by mattgraham

Data Structures and Algorithms

Language: Python

Stack and a Queue: Animal Shelter

Feature Tasks

Create a new class AnimalShelter which holds only dogs and cats. The shelter operates using a first-in, first-out approach.

Methods:

enqueue

dequeue

Whiteboard Process

challenge12

Examples

none

Unit Tests

Stretch Goal

If a cat or dog isn’t preferred, return whichever animal has been waiting in the shelter the longest.

Approach & Efficiency

My origional whiteboard didn’t work so I scrapped it and tried the method explained by JB to complete the challenge.