For this assignment you will create a stand-alone function, sort, that takes an
ID: 3828313 • Letter: F
Question
For this assignment you will create a stand-alone function, sort, that takes an UList<T> parameter and sorts it using the Insertion Sort algorithm. This sort function is to be placed in a file named sortIS.h and UList should be in a file named UList.h.
UList<T>
#items: vector<T>
+UList(size_t=10)
+insert(const T&): void
+erase(const T&): bool
+find(const T&) const: bool
+size() const: size_t
+empty() const: bool
+friend operator << (ostream&, const UList<U>&): ostream&
+friend sort (UList<U>&): void
Explanation / Answer
UList<T>
#items: vector<T>
+UList(size_t=10)
+insert(const T&): void
+erase(const T&): bool
+find(const T&) const: bool
+find(ulist<u>,bool val)
+friend operator<<(ostream file,const ulist<u>)
+friend sort(file,ulist<u>
+size() const: size_t
+empty() const: bool
+friend operator << (ostream&, const UList<U>&): ostream&
+friend sort (UList<U>&): void
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.