#include class Node { public: int data; std::shared_ptr next; }; class LinkedList { public: LinkedList() { head = nullptr; } void deleteNode(int n) { std::shared_ptr temp = head, prev; if (n == 1) { head
#include class Node { public: int data; std::shared_ptr next; }; class LinkedList { public: LinkedList() { head = nullptr; } void deleteNode(int n) { std::shared_ptr temp = head, prev; if (n == 1) { head