Question: -I need help with C++ . I'm working with an array of words . The array size is 1000 but not all 1000 slots will
-I need help with C++. I'm working with an array of words. The array size is 1000 but not all 1000 slots will be filled. I run an insertion sort algorithm and then output the array but the sorted array output includes the unused empty slots so there is a lot of blank spaces before the sorted words appear.
-The sorting algorithm seems to be reading in the empty array slots as well. Is there a way to read an array and only work with the non-empty slots? In other words, how do I filter out the array so that it will exclude the blanks? I can't be sorting and printing out the blank array slots, only the slots with a word on it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
