Question
C++ code I have one bulk array that is [2, 5000] that is rankings from 1-5000 in first column and second column is the page
C++ code
I have one bulk array that is [2, 5000] that is rankings from 1-5000 in first column and second column is the page numbers for each rank
I sorted the values in the first column using quicksort
the second column isn't sorted they just rearrange their location and follow their designated rankings
I have 6 other arrays also [2, 5000] not sorted. that follow the same idea
I need to then sort/rearrange the second column (page numbers) of each source on how the bulk array is sorted
for example
Bulk Array
672 | 3487 |
1292 | 203 |
2738 | 1392 |
3674 | 3984 |
4932 | 273 |
Sources
1622 | 3487 |
783 | 203 |
4032 | 1392 |
394 | 3984 |
1722 | 273 |
After the sources are sorted the same as the bulk array in the second column
you then need to find the number of inversion it takes the sources the sort in their normal order
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started