Generic Hacker Rank Solution
template <typename Element> void printArray(vector<Element> arr) {
for (int i = 0; i < arr.size(); i++) {
cout << arr[i] << endl;
}
}
Think Twice, Code Once. I'm not going to be bitter, I'm going to be better.
Comments
Post a Comment