You are viewing a single comment's thread. Return to all comments →
too many lines. this works as well:
template <class T> class AddElements { public: T element; AddElements(T i) { element = i; } T add(T i) { return element+i; } T concatenate(T i) { return element+i; } };
thanks for sharing,helped a lot.
why making data member public?
Test Case 8 and 9 did not pass for me..Anyone else?
Time limit tast case failed
I have written similar code but mine is showing "Terminated due to Timeout"
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
C++ Class Templates
You are viewing a single comment's thread. Return to all comments →
too many lines. this works as well:
thanks for sharing,helped a lot.
why making data member public?
Test Case 8 and 9 did not pass for me..Anyone else?
Time limit tast case failed
I have written similar code but mine is showing "Terminated due to Timeout"