CJCoding With Joseph
15free / daySign inCreate account
TitleTopicsAction
155
Box Template ClassCreate a template class `Box<T>` that stores a single value of any type. Implem...
easy○ Not Started
Templates
Solve
156
Pair Template GettersCreate a template class `Pair<T>` that holds two values of the same type. The c...
easy○ Not Started
Templates
Solve
157
Print Any TypeWrite a template function `printItem(T item)` that prints the item followed by a...
easy○ Not Started
Templates
Solve
158
Key-Value Pair TemplateCreate a template class `KeyValuePair<K, V>` that stores a key of type `K` and a...
easy○ Not Started
Templates
Solve
159
Get First ElementWrite a template function `getFirst(vector<T> items)` that returns the first ele...
easy○ Not Started
Templates
Solve
160
Are Equal TemplateWrite a template function `areEqual(T a, T b)` that returns `true` if both value...
easy○ Not Started
Templates
Solve
161
Get Middle ElementWrite a template function `getMiddle(vector<T> items)` that returns the middle e...
easy○ Not Started
Templates
Solve
740
Print Any Value with One TemplateWrite a function template `printValue(T value)` with one type parameter. It prin...
easy○ Not Started
Templates
Solve
741
Add Two Values of One TypeWrite a function template `add(T first, T second)` that returns `first + second`...
easy○ Not Started
Templates
Solve
742
Show Two Values of Different TypesWrite a function template `showPair(T first, U second)` with TWO type parameters...
easy○ Not Started
Templates
Solve
743
Return the Larger of Two ValuesWrite a function template `larger(T first, T second)` that returns the larger of...
easy○ Not Started
Templates
Solve
744
Holder Class Template with a ConstructorComplete the class template `Holder<T>`, which stores one private value of type ...
easy○ Not Started
Templates
Solve
745
Declare Variables with decltype`decltype(expression)` gives you the TYPE of an expression without writing the t...
easy○ Not Started
Templates
Solve
162
Pair Swap MethodCreate a template class `Pair<T>` that holds two values of the same type. The c...
medium○ Not Started
Templates
Solve
163
Count Matches in VectorWrite a template function `countMatches(vector<T> items, T target)` that returns...
medium○ Not Started
Templates
Solve
164
Student Record TemplateCreate a template class `StudentRecord<T, U>` that stores a student's name (type...
medium○ Not Started
Templates
Solve
165
Find Index in VectorWrite a template function `findIndex(vector<T> items, T target)` that returns th...
medium○ Not Started
Templates
Solve
166
Print Vector TemplateWrite a template function `printVector(vector<T> items)` that prints each elemen...
medium○ Not Started
Templates
Solve
746
Add Mixed Numeric Types with autoWrite a function template `addMixed(T first, U second)` with two type parameters...
medium○ Not Started
Templates
Solve
747
Swap Two Variables with ReferencesWrite a function template `swapValues(T& first, T& second)` that exchanges the t...
medium○ Not Started
Templates
Solve
748
Increase a Value Through a ReferenceWrite a function template `increaseBy(T& value, U amount)` with two type paramet...
medium○ Not Started
Templates
Solve
749
Sum an Array with a TemplateWrite a function template `sumArray(const T values[], int size)` that returns th...
medium○ Not Started
Templates
Solve
750
Count Equal Elements in an ArrayWrite a function template `countMatches(const T values[], int size, T target)` t...
medium○ Not Started
Templates
Solve
751
Trailing Return Type with decltypeWrite a function template `add(T first, U second)` whose return type is written ...
medium○ Not Started
Templates
Solve
752
Count Constructions per Template TypeComplete the class template `CounterBox<T>` so that it counts how many objects o...
medium○ Not Started
Templates
Solve
753
Flip a Two-Type PairComplete the class template `Pair<T, U>`, which stores a `first` of type `T` and...
medium○ Not Started
Templates
Solve
754
Describe and Add Three Different TypesWrite two function templates that each take THREE type parameters `A`, `B` and `...
medium○ Not Started
Templates
Solve
755
Define Triple's Members Outside the Class`Triple<A, B, C>` is a class template with THREE type parameters whose construct...
medium○ Not Started
Templates
Solve
167
Mini Queue TemplateCreate a template class `MiniQueue<T>` backed by a `vector<T>` that behaves like...
hard○ Not Started
Templates
Solve
756
Lvalue and Rvalue Overloads of a TemplateWrite two overloads of a function template `identify`: - `identify(T& value)` p...
hard○ Not Started
Templates
Solve
757
Fixed-Size Array with a Size ParameterBuild a class template `FixedArray<T, N>` from scratch. `T` is the element type ...
hard○ Not Started
Templates
Solve
758
Print Foo Differently for Lvalues and RvaluesMost of the class template `Foo<T>` is written for you: it stores a value and ke...
hard○ Not Started
Templates
Solve
759
Fixed-Capacity Stack TemplateBuild a class template `Stack<T, Capacity>` from scratch: `T` is the element typ...
hard○ Not Started
Templates
Solve