Answer:
C is the correct answer to your question
Me ......................
Answer:
See explaination
Explanation:
Keep two iterators, i (for nuts array) and j (for bolts array).
while(i < n and j < n) {
if nuts[i] == bolts[j] {
We have a case where sizes match, output/return
}
else if nuts[i] < bolts[j] {
this means that size of nut is smaller than that of bolt and we should go to the next bigger nut, i.e., i+=1
}
else {
this means that size of bolt is smaller than that of nut and we should go to the next bigger bolt, i.e., j+=1
}
}
Since we go to each index in both the array only once, the algorithm take O(n) time.
The best possible solution for the technician to do is to go into the disk management and find out what exactly is going on. The technician should check whether there is partition that has unallocated space. It is 100% the case that the rest of the 500 GB is in the unallocated space.
The techie need to grow his partition. Possible option for a scenario like this is delete the unallocated 500 GB space using NTFS. He can then recreate the available 500 GB free space as 1TB partition.