Getting tle plz me help to get the correct output...here is my code


since k can be greater than the no of nodes in the linked list so i have just made k = k%m
and also commented out ur operator overloading, since it was returning a stream which created an error
if your doubt is solved, please mark it as resolved

@seemantanishth 5 test cases pass . 1 test case is still got wrong answer


hey see, that code passes all the test cases

@Pramod123 are your sure u submitted my code?


seee i submitted that code in challenge section and getting 5 test cases correct…
@seemantanishth

593
704 714 758 332 614 995 0 634 773 102 239 205 327 83 956 777 804 268 950 21 459 23 747 492 996 816 489 447 360 964 164 325 323 184 56 422 952 371 130 676 389 873 290 987 417 394 700 347 364 170 111 116 774 938 60 513 787 728 515 495 380 370 347 392 393 392 313 787 686 475 68 15 348 528 414 600 946 50 485 784 796 183 290 706 466 593 89 435 284 65 547 674 884 391 17 481 740 60 721 740 931 19 870 210 322 245 43 474 739 165 632 480 44 595 512 767 800 693 218 905 431 883 999 925 392 977 203 225 500 274 976 920 796 163 175 997 293 799 808 65 619 601 117 234 668 62 609 300 967 156 878 516 253 374 256 755 958 66 828 127 815 956 510 688 787 588 281 58 23 261 615 622 34 368 267 254 469 1 381 561 552 583 391 963 13 794 974 385 960 576 627 332 447 625 490 500 103 116 530 638 119 305 870 417 129 456 764 157 558 498 364 901 833 559 963 119 359 767 545 602 542 573 991 391 395 865 589 763 872 557 459 164 966 738 182 977 975 843 174 431 664 402 134 89 556 114 155 960 716 446 96 212 6 408 897 497 276 92 215 678 151 701 420 2 259 128 199 855 108 184 954 739 753 466 162 757 89 34 647 405 515 117 261 279 282 809 977 250 713 321 512 772 923 22 653 856 238 947 537 162 921 119 608 850 107 968 33 24 262 14 470 15 573 901 870 660 65 560 215 425 410 402 127 757 332 974 749 607 456 195 780 963 573 736 832 476 86 558 459 266 837 733 546 989 944 215 564 467 908 821 947 135 615 14 446 443 755 695 189 775 775 240 319 186 312 339 137 735 360 714 728 420 733 321 145 936 534 610 414 835 826 272 628 435 889 438 355 124 190 72 574 55 374 282 979 710 154 680 924 86 611 750 560 678 335 889 428 335 254 701 534 925 763 41 371 254 567 16 711 888 104 673 85 15 202 353 88 207 740 495 482 927 599 576 482 487 186 229 139 843 633 170 234 457 591 168 336 463 602 461 642 80 118 514 797 97 293 317 478 374 637 968 913 67 930 402 455 88 222 117 678 756 206 832 100 869 343 213 875 271 953 781 244 68 322 899 669 218 454 638 484 467 878 499 977 417 686 571 711 512 379 777 28 777 589 30 218 396 514 952 388 597 124 353 348 243 427 972 476 869 341 613 412 461 653 937 788 834 562 491 450 280 986 417 62 483 175 14 108 60 760 306 698 699 467 615 59 557 610 469 187 712 387 368 68 125 84 344 344 813 799 866 912 704 298 925 4 625 435 791 868 142 898 481 983 6 111 608 449 684 741 966 50 819 567 97 997 18 987 769 230 955 412
72
this is the test case and the code runs fine on it, i will point this out to the mentors and get it checked in the meantime, do not worry however, learning is more important, if u have learnt the concept u can move ahead in the meantime
if your doubt is solved. please mark it as resolved

hey @Pramod123
https://ide.codingblocks.com/s/223985
try submitting this code, i have added the check for k==m
this should help u pass all the test cases