GithubHelp home page GithubHelp logo

pdp's Introduction

Proficiency Demo Practice

This program helps you practice for proficiency demos in CS 162, 163, and 202 at Portland State University.

You will implement functions for linear and circular linked lists. The program will run tests on your code and report whether you have succeeded.

How?

  1. Clone this project

    This code will run on Linux or Mac computers (including all MCECS Linux servers).

    Enter this command to get a copy of the code:

    git clone https://github.com/pdx-cs-tutors/pdp.git

    The code will be downloaded into a new folder called pdp.

  2. Build

    cd into the new folder and do an initial build of the project by running make:

    cd pdp/
    make

    It will take a few moments the first time.

  3. Run

    Now run the program:

    ./run

    You will see a long list of test outputs, like this one:

    FAILED  Missing item(s)
    Initial:  [3 -> 2]
    Called:   append(head, 1)
    Expected: [3 -> 2 -> 1]
    Got:      [3 -> 2]
    

    This output is telling you that we ran the function append(head, 1) on a list containing 3 -> 2. We expected to see a 1 added to the end of the list, but we did not.

    Your job is to write a correct append function, and to finish all the other functions so that the tests pass.

  4. Write

    The code you need to edit is organized into the include/ folder (for headers) and the src/ folder (for implementation). Here are the files:

    ├── include/
    │   ├── cll.h   <- Headers for circular linked list functions
    │   └── lll.h   <- Headers for linear linked list functions
    └── src/
        ├── cll/
        │   ├── insertion.cpp  <- Insertion functions for CLLs
        │   └── removal.cpp    <- Removal functions for CLLs
        └── lll/
            ├── insertion.cpp  <- Insertion functions for LLLs
            └── removal.cpp    <- Removal functions for LLLs
    

    Go to the src/lll/insertion.cpp file and implement the append function.

    If you need helper functions, you can add them in the header files in the include/ folder and implement them in the src/ folder.

    Once you're ready, build and run the tests again:

    make
    ./run

    Did the tests for append pass this time?

  5. Repeat

    Keep implementing functions and re-running the tests until they all pass!

Command line options

You can run only a certain subset of the tests if you like. Here are some examples:

./run
    Run ALL the tests
./run lll
    Run all the linear linked list tests
    (That is, all the tests in the src/lll/ folder)
./run cll
    Run all the circular linked list tests
    (That is, all the tests in the src/cll/ folder)
./run lll insertion
    Run all the insertion tests for linear linked lists
    (That is, all the tests for src/lll/insertion.cpp)
./run lll insertion append
    Run only the tests for the append function on LLLs
    (That is, only the tests for append in src/lll/insertion.cpp)

Roadmap

Additions to come. Next on our list:

  • Friendlier test outputs
  • New tests for copying CLLs and LLLs
  • Support for doubly linked lists
  • Support for binary search trees

Contributing

This project attempts to (mostly) stick to the conventions of Portland State's lower division C++ courses, although it does use a few C++11 features.

Suggestions, bug reports, and contributions are very welcome! You can make a pull request on Github, or talk with a CS Tutor on Slack or in person if you have questions.

pdp's People

Contributors

caseywilliams avatar

Stargazers

 avatar Drew Herron avatar Justin Greever avatar Evan Miller avatar Tim Pugh avatar Sam Showalter avatar Rohan Elukurthy avatar  avatar

Watchers

James Cloos avatar Sam Showalter avatar  avatar  avatar

Forkers

tim-pugh

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.