Code Monkey home page Code Monkey logo

peterwzhang / cs201projecttestcases Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 27 KB

These are my test cases for my semester project (Data Structure Library) in my data structures and algorithms class. It includes test cases for circular dynamic arrays, red black trees, binary heaps, and binomial heaps.

License: MIT License

C++ 97.90% Makefile 2.10%
binary-heap binomial-heap data-structures red-black-tree school test-cases testing circular-dynamic-array

cs201projecttestcases's Introduction

CS201 Project Test Cases

These are my test cases for my semester project (Data Structure Library) in my data structures and algorithms class. It includes test cases for circular dynamic arrays, red black trees, binary heaps, and binomial heaps written in C++.

Description of Test Cases

Each data structure has its own folder, inside each folder you will find a folder for each test case which contains a main cpp file and the correct output.

  1. Binary Heap (Heap)
    1. This will use a queue to test peekKey and extractMin after 10000 inserts.
    2. This will test templates and copy constructors.
  2. Binomial Heap (BHeap)
    1. This will use a queue to test peekKey and extractMin after 10000 inserts.
    2. This will test merge after constructing various heaps.
    3. This will test templates and copy constructors.
  3. Circular Dynamic Array (CDA)
    These test cases test for correctness already so they do not come with output files. There is a makefile in the CDA folder to compile these files.
    1. This will test a few irregular cases that could potentially break your CDA.
    2. This will test the runtimes of the add and delete operations. (irrelevant now due to the grading script linked below)
  4. Red Black Tree (RBTree)
    1. This will test all functions one by one.
    2. This will test templates then insertions and deletions.
    3. This will test deletions after inserting 100 elements.

Usage

  1. Either place your makefile and respective DS.cpp file into a test case folder or move the Main.cpp file to your own folder containing makefile and respective DS.cpp file.
  2. Run your makefile then run your executable
  3. Verify your output with the correct output files given.

Alternatively you can use my project grader found here to simulate grading similar to submission grading. I highly recommend using this project grader on the cs-intro server to test your projects.

Note to future CS201 takers

To my knowledge, the projects slightly change every semester, the general data structure should be the same (some dynamic array, some balanced tree, some form of heaps). There is no guarantee that a perfect score on my test cases will yield a perfect score on your actual project grade because of this. In any case you should use these as a base for testing files and build more test cases or build on top of these to fully check the correctness of your data structures.
Additionally, some extra userscripts for usfca's visualizers that will probably help you check your test cases will be linked below:

You can either use greasemonkey to install them or follow the instructions in the comments to paste the code into the javascript console of your browser.

cs201projecttestcases's People

Contributors

peterwzhang avatar

Stargazers

 avatar  avatar

Watchers

 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.