Commit beae9f0d authored by Ningxi Zhang's avatar Ningxi Zhang
Browse files

Initial commit

# Makefile
# Download from
\ No newline at end of file
This is the project identifier; you will need to put it in a comment
in any source code or header file you upload to the autograder. You
should also edit the right hand side of the "IDENTIFIER = " line of
the Makefile.
\ No newline at end of file
You can find the project spec at the link below.
Sorry for this inconvenient way to post a link, but
Canvas doesn't allow for "easy" creation of links.
\ No newline at end of file
The project identifier, in a text file, which is safe to copy and paste
from (PDF files are NOT safe to copy from):
For Part B you're going to be implementing three different versions of
a priority queue:
0) Unordered (2 versions, completed for you; useful for understanding 1-3)
1) Sorted
2) Binary heap
3) Pairing heap
You ARE given templated starter files for these. Start reading about
the Pairing heap, and start thinking about implementation. You will
need to use the "left child, right sibling" approach, NOT a vector or
deque of child pointers.
The autograder will not accept your submission if it does not include
the project identifier. Make sure that you grab the Makefile from this
folder, as it includes the project identifier code.
Make sure that all of your source code files, both .cpp and .h
include the project identifier line copied below (do not copy PDF):
// Project Identifier: C0F4DFE8B340D81183C208F70F9D2D797908754D
It is not necessary to include this in your test files.
The new data structure that you'll need for Project 3 is the
unordered_map<>. We'll be talking about how it works the first
lecture back after the midterm, but we didn't want you to have
to wait to start on your project until those lectures. Look up the
online documentation on the unordered_map<>, and also look at the
example file on Canvas / Files / Sample Code / umap_demo.cpp
(taken from the Lecture slides) and wordcount.cpp.
// This file is posted here so that you can easily copy/paste the code.
// It's unsafe to copy/paste from PDF files, due to hidden characters.
// Project Identifier: 5949F553E20B650AB0FB2266D3C0822B13D248B0
template <typename T>
void genPerms(vector<T> &path, size_t permLength) {
if (permLength == path.size()) {
// Do something with the path
} // if
if (!promising(path, permLength))
for (size_t i = permLength; i < path.size(); ++i) {
swap(path[permLength], path[i]);
genPerms(path, permLength + 1);
swap(path[permLength], path[i]);
} // for
} // genPerms()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment