Git Product home page Git Product logo

code_till_you_drop's Introduction

Team: code_till_you_drop

Colin Hosking, Aaron Li, Shruthi Venkata APCS Lab 02: All Hands on Deque!

To Do List:

  1. Obtain DLLNode class in repo
  2. Write interface Deque
  3. Implement methods (see below for priority), always maintaining functionality.
  4. Create main method to test functionality

Deque methods(in order of priority for implementation)

  1. size()
  2. isEmpty()
  3. addFirst()
  4. addLast()
  5. removeFirst()
  6. removeLast()
  7. peekFront()
  8. peekLast()

Architecture Options

Our team has opted to use the DLLNode(doubly linked list) because it offers a two way linkage. Double-ended queue means that one can enqueue and dequeue from both ends, which is why DLLNodes make the most sense. The node structure points both ways, allowing for a more logical implementation for Deque.

Development Plan:

We plan on implementing Deque by first examining many of the methods in class NodeQueue. The addLast(), removeFirst(), and peekFirst() will have nearly identical implementations due to the FIFO/LILO property of NodeQueue. However, we need to also implememnt addFirst(), removeLast(), and peekLast(), which are similar to the previous methods in funtionality but correspond to the opposite end of the doubly linked list underlying data structure.

size() should be simple to implemement in constant runtime as long as we increment and decrement an instance variable whenever we add or remove elements. isEmpty() should be simple to implement in constant runtime because the Deque is empty when size is 0.

code_till_you_drop's People

Contributors

aaronli39 avatar acjmr avatar shruthi00 avatar woosuk3746 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.