We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 21: Generics
Day 21: Generics
Sort by
recency
|
366 Discussions
|
Please Login in order to post a comment
Here is Day 21 Generics problem solution - https://programmingoneonone.com/hackerrank-day-21-generics-30-days-of-code-solution.html
c#
static void PrintArray(T[] a) { foreach(var i in a) { Console.WriteLine(i); } }
**c++ 11 // Write your code here
template void printArray(const vector& A) { for (const auto &element : A) { cout << element << endl; } }
**Java 8 Generic Solution **