Question: PLEASE C++ ONLY ) For this program you will store data in the form of both a linked list and a vector. You may have
PLEASE C++ ONLY
) For this program you will store data in the form of both a linked list and a vector. You may have two separate programs, one for each data structure, or put both in one program. There are two data files that will need to be analyzed for this program. The first, data1.txt, contains 150 integers. You will need to read in the file and load the integers into your vector and linked list. The second data file, data2.txt, contains 25 integers, each of which was found in the first set. You will need to read those values in, find them in your data structure, and delete the value. This deletion should not compromise the integrity of your data structure (i.e. the deletion should not lose the back half of the linked list if the 50th element is deleted). When reading in the integers from data1.txt, every 50 entries output the contents of your vector or linked list. Then after deleting the 25 values from data2.txt, output the final state of your data structure.
data1.txt
3212 3131 2225 3643 3458 4263 592 2725 4574 1302 1055 2201 4349 3453 2160 3359 3494 4795 2294 3419 230 2457 4941 1778 2527 949 4813 64 1788 1546 735 604 1331 94 993 754 1117 1752 3697 229 256 3376 4536 2043 4442 2735 4133 254 2504 4267 3287 4457 4645 2713 462 4718 851 3698 4332 779 2584 4123 3801 3590 2893 4069 1709 2147 2848 366 3810 491 571 3666 479 4388 4516 987 3356 2325 0 3511 2198 1663 2761 2420 3989 4727 959 1660 3051 1259 2686 3382 3559 4382 4351 4226 2140 3021 113 4239 2997 732 3775 1450 890 1092 4556 1249 653 635 1828 2130 3197 2667 1035 4835 2782 1311 789 432 4731 702 1958 2565 3506 4999 2625 4510 960 4124 715 2231 3345 3834 3751 3411 1138 2522 1885 2598 180 721 4513 1194 4983 1348 3163 4228
data2.txt
3212 3643 592 1302 4349 3359 2294 2457 2527 64 735 94 1117 229 4536 2735 2504 4457 462 3698 2584 3590 1709 366 571
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
