Query all columns (attributes) for every row in the CITY table. The CITY table is described as follows: Editor Mode. Emacs Normal Vim. Python examples, python solutions, C, C solutions and tutorials, HackerRank Solution, HackerRank 30 days of code solution, Coding tutorials, video tutorials. Hacker Rank, SQL. HackerRank Solution-Top Earners. Date: January 19, 2020 Author: Harun-or-Rashid 0 Comments.
Today we’re discussing Generics; be aware that not all languages support this construct, so fewer languages are enabled for this challenge. Check out the Tutorial tab for learning materials and an instructional video!
Write a single generic function named printArray; this function must take an array of generic elements as a parameter (the exception to this is C++, which takes a vector). The locked Solution class in your editor tests your function.
Note: You must use generics to solve this challenge. Do not write overloaded functions.
There is no input for this challenge. The locked Solution class in your editor will pass two different types of arrays to your printArray function.
Your printArray function should print each element of its generic array parameter on a new line.
static <E> void printArray( E inputArray)
for( E e : inputArray)
Hacker Rank Coding Interview