#include <iostream> #include <memory> #include <string> #include <utility> template <typename T> class LinkedList { private: struct Node { T data; std::unique_ptr<Node> next; explicit Node(T value) : data(std::move(value)), next(nullptr) {} };
Write a singly linked list class template in C++ with functions to append at the end, remove from the front, search and reverse the list. Hold the nodes with std::unique_ptr. In main, show a short usage example with int and another with std::string.

