29 while (head !=
nullptr) {
49 while (it != v.end()) {
50 if (prev ==
nullptr) {
70 auto v = std::vector<int>{};
71 while (head !=
nullptr) {
72 v.push_back(head->
val);
84 if (head ==
nullptr) {
87 auto next = head->
next;
88 while (next !=
nullptr) {
105 if (head ==
nullptr || begin >= end) {
114 for (
size_t i = 0; i < begin && prev->
next !=
nullptr; ++i) {
121 for (
size_t i = begin; i < end && current !=
nullptr; ++i) {
123 current = current->
next;
128 prev->
next = current;
142 size_t current_index = 0;
143 while (head !=
nullptr) {
144 if (current_index == i) {
Definition big_integer.hpp:14
static void linked_list_delete(ListNode *head)
Definition linked_list.hpp:83
static ListNode * linked_list_remove(ListNode *head, size_t begin, size_t end)
Definition linked_list.hpp:104
static ListNode * make_linked_list(const std::vector< int > &v)
Definition linked_list.hpp:42
static int get_linked_list_length(ListNode *head)
Definition linked_list.hpp:27
static ListNode * get_linked_list_ith_node(ListNode *head, size_t i)
Definition linked_list.hpp:141
static std::vector< int > linked_list_to_vector(ListNode *head)
Definition linked_list.hpp:69
Definition linked_list.hpp:7
ListNode(int x, ListNode *next)
Definition linked_list.hpp:17
int val
Definition linked_list.hpp:8
ListNode * next
Definition linked_list.hpp:9
ListNode(int x)
Definition linked_list.hpp:14
ListNode()
Definition linked_list.hpp:11