Remove Nodes In K-Group | LeetCode Problem | Linked List | DSA Using C++ | Kr.loreek
Remove Nodes from Linked List In K-Group | c++ programe
Question-
Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.
k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes, in the end, should remain as it is.
You may not alter the values in the list's nodes, only nodes themselves may be changed.
Approach-
Step 1- Reverse the first K-group using the recursive function ' reverse '
Step 2- Find the length of the remaining list ' getLength' function
Step 3- Call recursive function for reverse remaining parts
@TheCodingTrain @codingseekho @ProjectCoding @dsa @ctutorial8422 @cbysaurabhshuklasir32 @cbysaurabhshuklasir32 @Programing
Видео Remove Nodes In K-Group | LeetCode Problem | Linked List | DSA Using C++ | Kr.loreek канала CodeWithLoreek
Question-
Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.
k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes, in the end, should remain as it is.
You may not alter the values in the list's nodes, only nodes themselves may be changed.
Approach-
Step 1- Reverse the first K-group using the recursive function ' reverse '
Step 2- Find the length of the remaining list ' getLength' function
Step 3- Call recursive function for reverse remaining parts
@TheCodingTrain @codingseekho @ProjectCoding @dsa @ctutorial8422 @cbysaurabhshuklasir32 @cbysaurabhshuklasir32 @Programing
Видео Remove Nodes In K-Group | LeetCode Problem | Linked List | DSA Using C++ | Kr.loreek канала CodeWithLoreek
c++ c programing c++ programming coding dsa LeetCode LeetCode problem leetcode webdevlopment software development computer science bca btech programimg coders c++ programe reverse nodes in k group reverse linked list singly linked list doubly linked list linked list leetcode daly problem leetcode problum solve
Комментарии отсутствуют
Информация о видео
28 января 2024 г. 3:45:00
00:03:37
Другие видео канала