Suppose we need to store a table of distances between cities, as found in a road atlas. One obvious approach would be to use a square array distances, where distances[i][j] is the distance between city i and city j. Explain how to use a ragged array to cut the amount of memory needed for this data structure roughly in half.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here