Skip to content

Commit 584b174

Browse files
committed
Updated Single Linked List
1 parent d2902a6 commit 584b174

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Data Structures/Linked Lists/Singly Linked List/Reverse_Nodes_in_K_Groups.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,11 @@ ListNode* reverseKGroup(ListNode* head, int k) {
6262
int main()
6363
{
6464
int NumOfNodes, nn, data, k;
65-
//cout<<"Enter no. ot nodes\n";
6665
cin>>NumOfNodes;
6766
nn = NumOfNodes;
6867
ListNode* head = NULL;
6968
ListNode* tail = head;
7069

71-
//cout<<"Enter data\n";
7270
while(nn--){
7371
cin>>data;
7472
if(!head){
@@ -80,7 +78,6 @@ int main()
8078
tail = tail->next;
8179
}
8280
}
83-
//cout<<"\nK = ";
8481
cin>>k;
8582
ListNode* finalHead = reverseKGroup(head, k);
8683
printList(finalHead);

0 commit comments

Comments
 (0)