Remove Kth Node From End Time : O(n) Space : O(1) 1234567891011121314151617181920212223242526272829#include <vector>using namespace std;class LinkedList {public: int value; LinkedList *next; LinkedList(int value); void addMany(vector<int> values); vector<int> getNodesInArray();};void removeKthNodeFromEnd(LinkedList *head, int k) { if(k <= 0) return; LinkedList* runner = head; while(k-- and runner) runner = runner->next; if(!runner) { if(k > 0) return; head->value = head->next->value; } else { while(runner->next) { head = head->next; runner = runner->next; } } head->next = head->next->next;}