This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <string> | |
// Reverse the elements in a vector. | |
template <typename T> | |
std::vector<T> Reverse(std::vector<T> input) | |
{ | |
std::vector<T> output; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ListReverse | |
{ | |
/// <summary> | |
/// Demonstrate two methods which reverse the elements in a list. | |
/// </summary> | |
class Program |
NewerOlder